create_github_release 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/exe/revert-github-release +15 -5
- data/lib/create_github_release/command_line/parser.rb +1 -0
- data/lib/create_github_release/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad4b627e248269d5ca7f6b8118c8ec5a1c612b066b091655ef7d0826d395f494
|
4
|
+
data.tar.gz: bcbeb39161236026fb130678a8539d1bbdf6b363ab5acf40dcacb6b4dbfaa3eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d851c6e20196cdefd52601d088a4a5d8bb6e2ce687e19e4efb1beba5f10beeb2e0103df378bd4d9ade245a0c95540d8351ee6be8687e5c94f2943de6a2a64d7b
|
7
|
+
data.tar.gz: 6640d305d84d987b7645fcedb2c2a2b3e17d423d619c256584b442fcfdc44c8354170d96fb07646b32da8d2f496cb48ea9b9bf278591014dadd058f6bdf47975
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## v1.3.2 (2024-01-08)
|
9
|
+
|
10
|
+
[Full Changelog](https://github.com/main-branch/create_github_release/compare/v1.3.1..v1.3.2)
|
11
|
+
|
12
|
+
Changes since v1.3.1:
|
13
|
+
|
14
|
+
* 6b0e295 Delete the release in GitHub and add a comment to the release PR (#52)
|
15
|
+
|
16
|
+
## v1.3.1 (2024-01-08)
|
17
|
+
|
18
|
+
[Full Changelog](https://github.com/main-branch/create_github_release/compare/v1.3.0..v1.3.1)
|
19
|
+
|
20
|
+
Changes since v1.3.0:
|
21
|
+
|
22
|
+
* 7015e17 Require create_github_release/version where the gem version is needed (#50)
|
23
|
+
|
8
24
|
## v1.3.0 (2024-01-08)
|
9
25
|
|
10
26
|
[Full Changelog](https://github.com/main-branch/create_github_release/compare/v1.2.0..v1.3.0)
|
data/exe/revert-github-release
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
# It will delete the release branch and tag locally and remotely
|
6
6
|
|
7
7
|
require 'create_github_release'
|
8
|
+
require 'create_github_release/version'
|
8
9
|
|
9
10
|
require 'English'
|
10
11
|
require 'optparse'
|
@@ -18,6 +19,7 @@ class Options
|
|
18
19
|
def release_tag = @release_tag ||= "v#{release_version}"
|
19
20
|
def release_branch = @release_branch ||= "release-#{release_tag}"
|
20
21
|
def current_branch = @current_branch ||= `git rev-parse --abbrev-ref HEAD`.chomp
|
22
|
+
def release_pr = @release_pr ||= `gh pr list --search "head:#{release_branch}" --json number --jq ".[].number"`.chomp
|
21
23
|
def remote = @remote ||= 'origin'
|
22
24
|
end
|
23
25
|
|
@@ -78,6 +80,8 @@ class Parser
|
|
78
80
|
Usage:
|
79
81
|
#{File.basename($PROGRAM_NAME)} [--help | --version]
|
80
82
|
|
83
|
+
Version #{CreateGithubRelease::VERSION}
|
84
|
+
|
81
85
|
This script reverts the effect of running the create-github-release script.
|
82
86
|
It must be run in the root directory of the work tree with the release
|
83
87
|
branch checked out (which is the state create-github-release leaves you in).
|
@@ -138,6 +142,16 @@ def ref_exists?(name)
|
|
138
142
|
$CHILD_STATUS.success?
|
139
143
|
end
|
140
144
|
|
145
|
+
def revert_release!(options)
|
146
|
+
`gh pr comment #{options.release_pr} --body="Reverting this release using revert-github-release"`
|
147
|
+
`git checkout #{options.default_branch} >/dev/null`
|
148
|
+
`git branch -D #{options.release_branch} >/dev/null`
|
149
|
+
`git tag -d #{options.release_tag} >/dev/null`
|
150
|
+
`git push #{options.remote} --delete #{options.release_branch} >/dev/null`
|
151
|
+
`git push #{options.remote} --delete #{options.release_tag} >/dev/null`
|
152
|
+
`gh release delete #{options.release_tag} --yes >/dev/null`
|
153
|
+
end
|
154
|
+
|
141
155
|
unless in_work_tree? && in_root_directory?
|
142
156
|
warn 'ERROR: Not in the root directory of a Git work tree'
|
143
157
|
exit 1
|
@@ -156,10 +170,6 @@ unless ref_exists?(options.default_branch)
|
|
156
170
|
exit 1
|
157
171
|
end
|
158
172
|
|
159
|
-
|
160
|
-
`git branch -D #{options.release_branch} >/dev/null`
|
161
|
-
`git tag -d #{options.release_tag} >/dev/null`
|
162
|
-
`git push #{options.remote} --delete #{options.release_branch} >/dev/null`
|
163
|
-
`git push #{options.remote} --delete #{options.release_tag} >/dev/null`
|
173
|
+
revert_release!(options)
|
164
174
|
|
165
175
|
puts "Reverted release #{options.release_version}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: create_github_release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James
|
@@ -250,8 +250,8 @@ metadata:
|
|
250
250
|
allowed_push_host: https://rubygems.org
|
251
251
|
homepage_uri: https://github.com/main-branch/create_github_release
|
252
252
|
source_code_uri: https://github.com/main-branch/create_github_release
|
253
|
-
changelog_uri: https://rubydoc.info/gems/create_github_release/1.3.
|
254
|
-
documentation_uri: https://rubydoc.info/gems/create_github_release/1.3.
|
253
|
+
changelog_uri: https://rubydoc.info/gems/create_github_release/1.3.2/file/CHANGELOG.md
|
254
|
+
documentation_uri: https://rubydoc.info/gems/create_github_release/1.3.2
|
255
255
|
rubygems_mfa_required: 'true'
|
256
256
|
post_install_message:
|
257
257
|
rdoc_options: []
|