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. Tags naming a prerelease
version (e.g. v1.2.4.dev1) are created as GitHub prereleases.
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.
9 10 11 |
# File 'lib/gempilot/github_release.rb', line 9 def initialize(tag) @tag = tag end |
Instance Attribute Details
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
7 8 9 |
# File 'lib/gempilot/github_release.rb', line 7 def tag @tag end |
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 |
# File 'lib/gempilot/github_release.rb', line 13 def create sh "gh", "release", "create", "--generate-notes", "--fail-on-no-commits", *prerelease_flag, 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 |