ruby-gem-release 0.2.3 → 0.3.0
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 +6 -2
- data/README.md +1 -1
- data/lib/ruby-gem-release/version.rb +1 -1
- data/lib/ruby-gem-release/workflow/context.rb +16 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b3f5a468e45bd12e4299965c4e9417c9b49b0ac11e49339e5dd448c03ee10de
|
|
4
|
+
data.tar.gz: afb1782d46c31b3a2a93f582315f88d0c24947518a5fe9d3d5731acf01b7b46e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e25947ecf903be0158b6958a77fbccf5e50cdd74b0984f7c3f7ab3cf22c72b26fa0aaf90b0006bbbcc478d8e3b232152cbb8fc52ea07c973323d5150bbca2255
|
|
7
|
+
data.tar.gz: 8c97476f80580b55cff61957917135539962a63fb664948895a8e7b301cdeb6f5bfe3f44d87286fcaeec5ffb25f82d34df7457e10d28cd197676bac952154809
|
data/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.3.0 (2026/11/07)
|
|
4
|
+
|
|
5
|
+
- [#22](https://github.com/dblock/ruby-gem-release/pull/22): Make the release timezone configurable with a UTC default, use Eastern Time for this project's releases, and prepare version 0.3.0 - [@dblock](https://github.com/dblock).
|
|
6
|
+
|
|
7
|
+
## 0.2.3 (2026/11/07)
|
|
4
8
|
|
|
5
9
|
- [#21](https://github.com/dblock/ruby-gem-release/pull/21): Remove dry-run inputs and release context, always publish when dispatched, and test installed release callbacks with isolated publication boundaries (breaking change) - [@dblock](https://github.com/dblock).
|
|
6
10
|
|
|
7
|
-
## 0.2.2 (2026/11/
|
|
11
|
+
## 0.2.2 (2026/11/07)
|
|
8
12
|
|
|
9
13
|
- [#18](https://github.com/dblock/ruby-gem-release/pull/18): Update README release tags as part of the next development iteration - [@dblock](https://github.com/dblock).
|
|
10
14
|
- [#19](https://github.com/dblock/ruby-gem-release/pull/19): Use the incremented version in next development iteration commit messages and update terminology throughout workflows and documentation - [@dblock](https://github.com/dblock).
|
data/README.md
CHANGED
|
@@ -10,16 +10,19 @@ module RubyGemRelease
|
|
|
10
10
|
class Context
|
|
11
11
|
def configure!
|
|
12
12
|
names = %w[INPUT_VERSION INPUT_GEMSPEC DEFAULT_BRANCH GIT_USER_NAME GIT_USER_EMAIL RUBYGEMS_OWNER]
|
|
13
|
-
|
|
13
|
+
timezone = ENV.fetch('TZ', 'UTC')
|
|
14
|
+
validate_timezone(timezone)
|
|
15
|
+
export(names.to_h { |name| [name, ENV.fetch(name)] }.merge('TZ' => timezone))
|
|
14
16
|
end
|
|
15
17
|
|
|
16
18
|
def capture!
|
|
17
19
|
check_branch
|
|
20
|
+
validate_timezone(ENV.fetch('TZ', 'UTC'))
|
|
18
21
|
package = Package::RubyGem.new(gemspec: ENV.fetch('INPUT_GEMSPEC', nil))
|
|
19
22
|
release = initial_release(package)
|
|
20
23
|
git = configured_git
|
|
21
24
|
git.check_current!(release)
|
|
22
|
-
export('GEMSPEC' => package.gemspec, 'RELEASE_PREVIOUS_VERSION' => release.version,
|
|
25
|
+
export('TZ' => ENV.fetch('TZ', 'UTC'), 'GEMSPEC' => package.gemspec, 'RELEASE_PREVIOUS_VERSION' => release.version,
|
|
23
26
|
'RELEASE_DATE' => release.date.iso8601, 'RELEASE_INITIAL_COMMIT' => git.head)
|
|
24
27
|
end
|
|
25
28
|
|
|
@@ -39,7 +42,17 @@ module RubyGemRelease
|
|
|
39
42
|
version = package.version
|
|
40
43
|
validate_version(version)
|
|
41
44
|
validate_version(ENV.fetch('INPUT_VERSION')) unless ENV.fetch('INPUT_VERSION', '').empty?
|
|
42
|
-
Release.new(version: version, previous_version: version, date:
|
|
45
|
+
Release.new(version: version, previous_version: version, date: release_date)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def release_date
|
|
49
|
+
(ENV.key?('TZ') ? Time.now.getlocal : Time.now.utc).to_date
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def validate_timezone(timezone)
|
|
53
|
+
valid = %r{\A[A-Za-z0-9_+-]+(?:/[A-Za-z0-9_+-]+)*\z}.match?(timezone) &&
|
|
54
|
+
File.file?(File.join('/usr/share/zoneinfo', timezone))
|
|
55
|
+
raise ArgumentError, 'timezone must identify an installed timezone, such as UTC or America/New_York' unless valid
|
|
43
56
|
end
|
|
44
57
|
|
|
45
58
|
def configured_git
|