Class: Gempilot::GithubRelease
- Inherits:
-
Object
- Object
- Gempilot::GithubRelease
- Includes:
- StrictShell
- Defined in:
- lib/gempilot/github_release.rb
Overview
Manages GitHub releases for a version tag.
Instance Attribute Summary collapse
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
-
#initialize(tag) ⇒ GithubRelease
constructor
A new instance of GithubRelease.
- #list ⇒ Object
Constructor Details
#initialize(tag) ⇒ GithubRelease
Returns a new instance of GithubRelease.
8 9 10 |
# File 'lib/gempilot/github_release.rb', line 8 def initialize(tag) @tag = tag end |
Instance Attribute Details
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
6 7 8 |
# File 'lib/gempilot/github_release.rb', line 6 def tag @tag end |
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/gempilot/github_release.rb', line 12 def create sh "git", "push" sh "git", "push", "--tags" sh "gh", "release", "create", "--generate-notes", "--fail-on-no-commits", tag end |
#destroy ⇒ Object
20 21 22 23 24 |
# File 'lib/gempilot/github_release.rb', line 20 def destroy sh "gh", "release", "delete", "--yes", "--cleanup-tag", tag end |
#list ⇒ Object
26 27 28 |
# File 'lib/gempilot/github_release.rb', line 26 def list sh "gh", "release", "list" end |