|
5 | 5 |
|
6 | 6 | checklist = Checklist.new |
7 | 7 |
|
8 | | - checklist.run "on master branch and nothing to commit" do |
| 8 | + |
| 9 | + say "Checklist for version !txtgrn!#{version}!txtrst!" |
| 10 | + |
| 11 | + checklist.run "git on master and clean" do |
9 | 12 | `git status`.match /On branch master.*nothing to commit/m |
10 | 13 | end |
11 | 14 |
|
12 | | - checklist.run "code version is #{version}" do |
| 15 | + checklist.run "code version" do |
13 | 16 | File.read('lib/bashly/version.rb').include? version |
14 | 17 | end |
15 | 18 |
|
16 | | - checklist.run "dockerfile version is #{version}" do |
| 19 | + checklist.run "dockerfile version" do |
17 | 20 | File.read('Dockerfile').include? version |
18 | 21 | end |
19 | 22 |
|
20 | | - checklist.run "tag v#{version} exists" do |
| 23 | + checklist.run "local git tag" do |
21 | 24 | !`git tag -l v#{version}`.empty? |
22 | 25 | end |
23 | 26 |
|
24 | | - checklist.run "changelog has a section for #{version}" do |
| 27 | + checklist.run "changelog" do |
25 | 28 | File.read('CHANGELOG.md').include? "v#{version}" |
26 | 29 | end |
27 | 30 |
|
28 | | - checklist.run "github has tag v#{version}" do |
| 31 | + checklist.run "github tag" do |
29 | 32 | checklist.url_exist? "https://github.com/DannyBen/bashly/tree/v#{version}" |
30 | 33 | end |
31 | 34 |
|
32 | | - checklist.run "built gem is version #{version}" do |
| 35 | + checklist.run "local gem version" do |
33 | 36 | `bundle exec bashly --version`.strip == version |
34 | 37 | end |
35 | 38 |
|
36 | | - checklist.run "published gem is version #{version}" do |
| 39 | + checklist.run "published gem version" do |
37 | 40 | checklist.url_exist? "https://rubygems.org/gems/bashly/versions/#{version}" |
38 | 41 | end |
39 | 42 |
|
40 | | - checklist.run "local docker image exists with tag #{version}" do |
| 43 | + checklist.run "local docker image version" do |
41 | 44 | `docker images`.match /bashly\s*#{version}/ |
42 | 45 | end |
43 | 46 |
|
44 | | - checklist.run "remote docker image exists with tag #{version}" do |
| 47 | + checklist.run "remote docker image version" do |
45 | 48 | digest = `docker inspect --format='{{.RepoDigests}}' dannyben/bashly:#{version}`[/@sha256:(.*)\]/,1] |
46 | 49 | if digest |
47 | 50 | checklist.url_exist? "https://hub.docker.com/layers/dannyben/bashly/#{version}/images/sha256-#{digest}" |
|
50 | 53 | end |
51 | 54 | end |
52 | 55 |
|
53 | | - checklist.run "github release is available for #{version}" do |
| 56 | + checklist.run "github release" do |
54 | 57 | checklist.url_exist? "https://github.com/DannyBen/bashly/releases/tag/v#{version}" |
55 | 58 | end |
56 | 59 |
|
57 | | - checklist.run "version in local retype is #{version}" do |
| 60 | + checklist.run "local retype" do |
58 | 61 | YAML.load_file('/vagrant/sites/bashly/retype.yml')['branding']['label'] == "v#{version}" |
59 | 62 | end |
60 | 63 |
|
61 | | - checklist.run "version in remote retype is #{version}" do |
| 64 | + checklist.run "remote retype" do |
62 | 65 | `curl -Ss https://raw.githubusercontent.com/DannyBen/bashly-book/master/retype.yml`.include? "label: v#{version}" |
63 | 66 | end |
64 | 67 |
|
|
0 commit comments