create_github_release 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/exe/revert-github-release +14 -5
- 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,14 @@ 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
|
+
|
8
16
|
## v1.3.1 (2024-01-08)
|
9
17
|
|
10
18
|
[Full Changelog](https://github.com/main-branch/create_github_release/compare/v1.3.0..v1.3.1)
|
data/exe/revert-github-release
CHANGED
@@ -19,6 +19,7 @@ class Options
|
|
19
19
|
def release_tag = @release_tag ||= "v#{release_version}"
|
20
20
|
def release_branch = @release_branch ||= "release-#{release_tag}"
|
21
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
|
22
23
|
def remote = @remote ||= 'origin'
|
23
24
|
end
|
24
25
|
|
@@ -79,6 +80,8 @@ class Parser
|
|
79
80
|
Usage:
|
80
81
|
#{File.basename($PROGRAM_NAME)} [--help | --version]
|
81
82
|
|
83
|
+
Version #{CreateGithubRelease::VERSION}
|
84
|
+
|
82
85
|
This script reverts the effect of running the create-github-release script.
|
83
86
|
It must be run in the root directory of the work tree with the release
|
84
87
|
branch checked out (which is the state create-github-release leaves you in).
|
@@ -139,6 +142,16 @@ def ref_exists?(name)
|
|
139
142
|
$CHILD_STATUS.success?
|
140
143
|
end
|
141
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
|
+
|
142
155
|
unless in_work_tree? && in_root_directory?
|
143
156
|
warn 'ERROR: Not in the root directory of a Git work tree'
|
144
157
|
exit 1
|
@@ -157,10 +170,6 @@ unless ref_exists?(options.default_branch)
|
|
157
170
|
exit 1
|
158
171
|
end
|
159
172
|
|
160
|
-
|
161
|
-
`git branch -D #{options.release_branch} >/dev/null`
|
162
|
-
`git tag -d #{options.release_tag} >/dev/null`
|
163
|
-
`git push #{options.remote} --delete #{options.release_branch} >/dev/null`
|
164
|
-
`git push #{options.remote} --delete #{options.release_tag} >/dev/null`
|
173
|
+
revert_release!(options)
|
165
174
|
|
166
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: []
|