Skip to content

Commit bd14bd5

Browse files
committed
rubocop
1 parent 1bce730 commit bd14bd5

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

helpers/release.rb

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,73 @@
1-
help 'Run release checklist'
1+
help 'Run release checklist'
22
usage 'release VERSION'
33
action :release do |args|
44
version = args['VERSION']
55

66
checklist = Checklist.new
77

8-
98
say "Checklist for version !txtgrn!#{version}!txtrst!"
109

11-
checklist.run "git on master and clean" do
12-
`git status`.match /On branch master.*nothing to commit/m
10+
checklist.run 'git on master and clean' do
11+
`git status`.match(/On branch master.*nothing to commit/m)
1312
end
1413

15-
checklist.run "code version" do
14+
checklist.run 'code version' do
1615
File.read('lib/bashly/version.rb').include? version
1716
end
1817

19-
checklist.run "dockerfile version" do
18+
checklist.run 'dockerfile version' do
2019
File.read('Dockerfile').include? version
2120
end
2221

23-
checklist.run "local git tag" do
22+
checklist.run 'local git tag' do
2423
!`git tag -l v#{version}`.empty?
2524
end
2625

27-
checklist.run "changelog" do
26+
checklist.run 'changelog' do
2827
File.read('CHANGELOG.md').include? "v#{version}"
2928
end
3029

31-
checklist.run "github tag" do
30+
checklist.run 'github tag' do
3231
checklist.url_exist? "https://github.com/DannyBen/bashly/tree/v#{version}"
3332
end
3433

35-
checklist.run "local gem is built" do
34+
checklist.run 'local gem is built' do
3635
File.exist? "gems/bashly-#{version}.gem"
3736
end
3837

39-
checklist.run "published gem version" do
38+
checklist.run 'published gem version' do
4039
checklist.url_exist? "https://rubygems.org/gems/bashly/versions/#{version}"
4140
end
4241

43-
checklist.run "local docker image version" do
44-
`docker images`.match /bashly\s*#{version}/
42+
checklist.run 'local docker image version' do
43+
`docker images`.match(/bashly\s*#{version}/)
4544
end
4645

47-
checklist.run "remote docker image version" do
48-
digest = `docker inspect --format='{{.RepoDigests}}' dannyben/bashly:#{version}`[/@sha256:(.*)\]/,1]
46+
checklist.run 'remote docker image version' do
47+
digest = `docker inspect --format='{{.RepoDigests}}' dannyben/bashly:#{version}`[/@sha256:(.*)\]/, 1]
4948
if digest
5049
checklist.url_exist? "https://hub.docker.com/layers/dannyben/bashly/#{version}/images/sha256-#{digest}"
5150
else
5251
false
5352
end
5453
end
5554

56-
checklist.run "github release" do
55+
checklist.run 'github release' do
5756
`curl -SsI https://github.com/DannyBen/bashly/releases/latest`.match "location: https://github.com/.*/v#{version}"
5857
end
5958

60-
checklist.run "local retype is on master and clean" do
61-
`git -C /vagrant/sites/bashly status`.match /On branch master.*nothing to commit/m
59+
checklist.run 'local retype is on master and clean' do
60+
`git -C /vagrant/sites/bashly status`.match(/On branch master.*nothing to commit/m)
6261
end
6362

64-
checklist.run "local retype version" do
63+
checklist.run 'local retype version' do
6564
YAML.load_file('/vagrant/sites/bashly/retype.yml')['branding']['label'] == "v#{version}"
6665
end
6766

68-
checklist.run "remote retype version" do
67+
checklist.run 'remote retype version' do
6968
`curl -Ss https://raw.githubusercontent.com/DannyBen/bashly-book/master/retype.yml`.include? "label: v#{version}"
7069
end
7170

72-
color = checklist.failed == 0 ? '!bldgrn!' : '!bldred!'
71+
color = checklist.failed.zero? ? '!bldgrn!' : '!bldred!'
7372
say " #{color}Done with #{checklist.failed} failed tasks"
7473
end

0 commit comments

Comments
 (0)