aufgaben 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/aufgaben/base.rb +4 -0
- data/lib/aufgaben/bump/base.rb +2 -2
- data/lib/aufgaben/release.rb +29 -10
- data/lib/aufgaben/version.rb +1 -1
- 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: 7a5183c060cb857117a2f48b0e944fec202ec940310638fa36a588ee71295f60
|
4
|
+
data.tar.gz: 7eb0f5f2afed4376f9e07fe4f03516c4f190f18e4f2dfbd8b84689032dda0e1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fb90efed4ac4cea0a638890880db35999f91b457ebf24e834e304156b7701e9a642e70f4e450c9a32364dc4629e421ee17e57f31700cad1e7422367e021257a
|
7
|
+
data.tar.gz: fde7bec5eb41b82cd32cbe7380ecccb1f54ac04240d57ccc044e904e960e3cd6a7b9bd5b159f0d4536e552a9d1aca24962eb754e2462a94864a4cd4a7e86647e
|
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.5...HEAD)
|
8
|
+
|
9
|
+
## 0.8.5
|
10
|
+
|
11
|
+
[Full diff](https://github.com/ybiquitous/aufgaben/compare/0.8.4...0.8.5)
|
12
|
+
|
13
|
+
- Check committed files on `release` task [#49](https://github.com/ybiquitous/aufgaben/pull/49)
|
8
14
|
|
9
15
|
## 0.8.4
|
10
16
|
|
data/lib/aufgaben/base.rb
CHANGED
data/lib/aufgaben/bump/base.rb
CHANGED
data/lib/aufgaben/release.rb
CHANGED
@@ -34,8 +34,8 @@ module Aufgaben
|
|
34
34
|
|
35
35
|
msg "If you want to do this on dry-run mode, set 'DRY_RUN=1'." unless dry_run?
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
git "checkout", default_branch, "--quiet"
|
38
|
+
git "pull", "origin", default_branch, "--quiet"
|
39
39
|
sh "bundle", "install", "--quiet"
|
40
40
|
|
41
41
|
if current_version.empty?
|
@@ -47,7 +47,7 @@ module Aufgaben
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
|
50
|
+
git "diff", "--exit-code", "--quiet" do |ok|
|
51
51
|
abort "Uncommitted changes found!" unless ok
|
52
52
|
end
|
53
53
|
|
@@ -57,7 +57,7 @@ module Aufgaben
|
|
57
57
|
msg "Releasing a new version: #{current_version} -> #{colored_new_version}"
|
58
58
|
end
|
59
59
|
|
60
|
-
|
60
|
+
git "--no-pager", "log", "--format=%C(auto)%h %Creset%s", "#{current_version}..HEAD"
|
61
61
|
|
62
62
|
each_file do |file|
|
63
63
|
update_version_in file, write: false
|
@@ -75,16 +75,18 @@ module Aufgaben
|
|
75
75
|
else
|
76
76
|
add_changelog with: new_version
|
77
77
|
end
|
78
|
-
|
78
|
+
git "add", changelog
|
79
79
|
|
80
80
|
each_file do |file|
|
81
81
|
update_version_in file
|
82
|
-
|
82
|
+
git "add", file
|
83
83
|
end
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
|
85
|
+
git "commit", "--quiet", "--message", "Version #{new_version}"
|
86
|
+
git "tag", "--annotate", "--message", "Version #{new_version}", new_version
|
87
|
+
git "show", "--pretty"
|
88
|
+
|
89
|
+
check_committed_files
|
88
90
|
|
89
91
|
git_push = Color.new("git push --follow-tags").green
|
90
92
|
msg "The tag '#{colored_new_version}' is added. Run '#{git_push}'."
|
@@ -158,8 +160,25 @@ module Aufgaben
|
|
158
160
|
msg "'#{changelog}' is added."
|
159
161
|
end
|
160
162
|
|
163
|
+
def check_committed_files
|
164
|
+
expected = [*expanded_files, changelog].sort
|
165
|
+
actual = `git diff --name-only HEAD^...HEAD`.lines(chomp: true).sort
|
166
|
+
|
167
|
+
if expected != actual
|
168
|
+
abort <<~MSG
|
169
|
+
The committed files are not what was expected.
|
170
|
+
Expected: #{expected}
|
171
|
+
Actual: #{actual}
|
172
|
+
MSG
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
def expanded_files
|
177
|
+
@expanded_files ||= Dir.glob(files, File::FNM_EXTGLOB)
|
178
|
+
end
|
179
|
+
|
161
180
|
def each_file(&block)
|
162
|
-
|
181
|
+
expanded_files.each(&block)
|
163
182
|
end
|
164
183
|
|
165
184
|
def update_version_in(file, write: true)
|
data/lib/aufgaben/version.rb
CHANGED