Class: Gempilot::GithubRelease

Inherits:
Object
  • Object
show all
Includes:
StrictShell
Defined in:
lib/gempilot/github_release.rb

Overview

Manages GitHub releases for a version tag.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#tagObject (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

#createObject



12
13
14
15
16
# File 'lib/gempilot/github_release.rb', line 12

def create
  sh "gh", "release", "create",
     "--generate-notes", "--fail-on-no-commits",
     tag
end

#destroyObject



18
19
20
21
22
# File 'lib/gempilot/github_release.rb', line 18

def destroy
  sh "gh", "release", "delete",
     "--yes", "--cleanup-tag",
     tag
end

#listObject



24
25
26
# File 'lib/gempilot/github_release.rb', line 24

def list
  sh "gh", "release", "list"
end