aufgaben 0.8.3 → 0.8.4
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 +7 -1
- data/lib/aufgaben/release.rb +24 -5
- data/lib/aufgaben/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 914a19e9a0b71bd7194cad833f85547ca6e3e0769269089595cdc5a14e28e786
|
|
4
|
+
data.tar.gz: 2e5a9e462cbf48d046b42be4972562633d56014f724c84adc569d8c3f06553cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d08f4f69f9581f0789e4e775a0dcdb15dda7511956acd0ed44c2f3f0b324122530b7b0f0b2899adc5597384dc51fb3be2e6d56d9dc39458ff3c0f7a43d0c532
|
|
7
|
+
data.tar.gz: 908642fe3a1d55c4343410e29ef462e58a4d3733ece3ed12a5b6e83dfdcd5dcff748bb3675b0f78fd51ca934b9eba6a5d1cc0154d90acf3dbe62b70c3b9410ba
|
data/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
-
[Full diff](https://github.com/ybiquitous/aufgaben/compare/0.8.
|
|
7
|
+
[Full diff](https://github.com/ybiquitous/aufgaben/compare/0.8.4...HEAD)
|
|
8
|
+
|
|
9
|
+
## 0.8.4
|
|
10
|
+
|
|
11
|
+
[Full diff](https://github.com/ybiquitous/aufgaben/compare/0.8.3...0.8.4)
|
|
12
|
+
|
|
13
|
+
- Check if specified files are updated on `release` task [#46](https://github.com/ybiquitous/aufgaben/pull/46)
|
|
8
14
|
|
|
9
15
|
## 0.8.3
|
|
10
16
|
|
data/lib/aufgaben/release.rb
CHANGED
|
@@ -59,6 +59,10 @@ module Aufgaben
|
|
|
59
59
|
|
|
60
60
|
sh "git", "--no-pager", "log", "--format=%C(auto)%h %Creset%s", "#{current_version}..HEAD"
|
|
61
61
|
|
|
62
|
+
each_file do |file|
|
|
63
|
+
update_version_in file, write: false
|
|
64
|
+
end
|
|
65
|
+
|
|
62
66
|
if dry_run?
|
|
63
67
|
msg "This is a dry-run mode. No actual changes. Next, run this without `DRY_RUN=1`."
|
|
64
68
|
else
|
|
@@ -73,7 +77,7 @@ module Aufgaben
|
|
|
73
77
|
end
|
|
74
78
|
sh "git", "add", changelog
|
|
75
79
|
|
|
76
|
-
|
|
80
|
+
each_file do |file|
|
|
77
81
|
update_version_in file
|
|
78
82
|
sh "git", "add", file
|
|
79
83
|
end
|
|
@@ -154,12 +158,27 @@ module Aufgaben
|
|
|
154
158
|
msg "'#{changelog}' is added."
|
|
155
159
|
end
|
|
156
160
|
|
|
157
|
-
def
|
|
161
|
+
def each_file(&block)
|
|
162
|
+
Dir.glob(files, File::FNM_EXTGLOB).each(&block)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def update_version_in(file, write: true)
|
|
158
166
|
content = File.read(file)
|
|
159
|
-
content = content.gsub(Regexp.new('\b' + Regexp.escape(current_version) + '\b'), new_version)
|
|
160
|
-
File.write(file, content)
|
|
161
167
|
|
|
162
|
-
|
|
168
|
+
current_version_pattern = Regexp.new('\b' + Regexp.escape(current_version) + '\b')
|
|
169
|
+
unless current_version_pattern.match?(content)
|
|
170
|
+
abort "The current version '#{current_version}' is not found in '#{file}'!"
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
new_content = content.gsub(current_version_pattern, new_version)
|
|
174
|
+
if content == new_content
|
|
175
|
+
abort "No changes in '#{file}'"
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if write
|
|
179
|
+
File.write(file, new_content)
|
|
180
|
+
msg "'#{file}' is updated."
|
|
181
|
+
end
|
|
163
182
|
end
|
|
164
183
|
|
|
165
184
|
def msg(text)
|
data/lib/aufgaben/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aufgaben
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Masafumi Koba
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-07
|
|
11
|
+
date: 2021-09-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|