renuo-cli 0.2.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58d443df0bdb7b235f2302b2985a61e22ed4c632b3d7c94b851f15d949c73f84
4
- data.tar.gz: b5f3dd938a626821eed89bd77e7b258e5e54b474ba6177ad33a613532e0dedd0
3
+ metadata.gz: b0cd1884a0ce0ad7e20d8470c415189ebe1597739c7c5cf1b6da46b6cca5afd2
4
+ data.tar.gz: 4fa496ce2e065343fdb773d7ea7b99cc36f05d7ff3d21e741e2d7b6b4fc79074
5
5
  SHA512:
6
- metadata.gz: db75471beea7f88065f351fed2798bc668ec7bb5ad839fc8bc9194c501cdd1ee84a045392985d26b55d73ad567d249cc24bf8866d1dc58ed3a48f48981fdb7f0
7
- data.tar.gz: 4a7b98a910765d0c0b5c68d5bb87b1fae595575d71e76e65615a455c881a01cb4dfd64f4127d807f05bd0533d8829702a5d2e47ad5eefc9e89d22afd9576daf5
6
+ metadata.gz: 73f90a7d29f4dd57a8d4b343b7897b8f2f008b0f7bcf47f5c21aee8d8ae3e5d1b6c1acd2d88ae0ad08578b87528adf8300477e3138948502afb77ba913a75c6f
7
+ data.tar.gz: 36b3526d32ca047b0e7f42375da616e60fda75d618f0a09865b5a369b8b892c7b22655b23737ec61274846e2fc78b746720c7c998c04a380286a67da1e1ef10d
data/README.md CHANGED
@@ -43,6 +43,8 @@ push git commits and tags, and push the `.gem` file to [rubygems.org](https://ru
43
43
 
44
44
  ## Release
45
45
 
46
+ To be able to release you must be logged in with an owners account of [rubygems.org/gems/renuo-cli](https://rubygems.org/gems/renuo-cli).
47
+
46
48
  ```sh
47
49
  git flow release start [.....]
48
50
  # adjust version.rb
@@ -51,9 +53,8 @@ git commit -av
51
53
  git flow release finish [.....]
52
54
  git push origin develop:develop
53
55
  git push origin master:master --tags
54
- git checkout master
55
- bundle exec rake release
56
- git checkout develop
56
+ gem build renuo-cli.gemspec
57
+ gem push renuo-cli-X.Y.Z.gem (adapt the version)
57
58
  ```
58
59
 
59
60
  ## Contributing
@@ -4,6 +4,7 @@ NAME=$1
4
4
  ENVIRONMENTS=(master develop testing)
5
5
  tmp_emails=`./fetch_all_emails`
6
6
  EMAILS=(${tmp_emails//\\n/ })
7
+ ADMIN_EMAIL=admin@renuo.ch
7
8
 
8
9
  if [ "$NAME" = "" ]
9
10
  then
@@ -24,6 +25,8 @@ do
24
25
  do
25
26
  echo "heroku access:add $email --app $HEROKU_NAME"
26
27
  done
28
+ echo "heroku access:add $ADMIN_EMAIL --app $HEROKU_NAME"
29
+ echo "heroku apps:transfer -a $HEROKU_NAME $ADMIN_EMAIL"
27
30
  echo
28
31
  done
29
32
 
@@ -1,3 +1,3 @@
1
1
  #!/bin/sh
2
2
  # this script returns all Renuo (current) Employees email addresses
3
- curl -s https://docs.google.com/spreadsheets/d/1rJFJQCgpz6GajMlGf0anKwVl5AY6TrYjMnJ4W-_0MK4/pub\?gid\=703649940\&single\=true\&output\=csv | dos2unix | grep -Ev "^$"
3
+ curl -s https://docs.google.com/spreadsheets/d/1rJFJQCgpz6GajMlGf0anKwVl5AY6TrYjMnJ4W-_0MK4/pub\?gid\=703649940\&single\=true\&output\=csv | dos2unix | grep -Ev "^$" | sed '/n\/a/d'
@@ -67,10 +67,7 @@ class ReleaseProject
67
67
  abort('>> Please bump the version in files manually. Cancelling release.')
68
68
  end
69
69
 
70
- unless agree(">> Are you sure you wish to deploy '#{project_name}' " \
71
- "as a #{update_type} release (#{current_version(project_name)} => #{version})?")
72
- abort('>> Cancelling Release.')
73
- end
70
+ ask_for_final_confirmation(project_name, update_type, version)
74
71
 
75
72
  return if release_flow(project_name, version)
76
73
  abort('>> Unable to finish release and push to master. Cancelling release.')
@@ -83,7 +80,8 @@ class ReleaseProject
83
80
  end
84
81
 
85
82
  def version_bump?(project_name, current_version)
86
- if system("#{move_and_cd(project_name)} && grep -R -F --color --exclude-dir=.git '#{current_version}' .")
83
+ grep = "grep -R -F --color --exclude-dir=.git --exclude=Gemfile* '#{current_version}' ."
84
+ if system("#{move_and_cd(project_name)} && #{grep}")
87
85
  agree(">> Current version number (#{current_version}) found in above files. " \
88
86
  ' Do you wish to continue without changing it?')
89
87
  else
@@ -129,4 +127,17 @@ class ReleaseProject
129
127
  def cleanup
130
128
  system("rm -rf #{TEMP_FOLDER_NAME}")
131
129
  end
130
+
131
+ def ask_for_final_confirmation(project_name, update_type, version)
132
+ unless agree(">> Are you sure you wish to deploy '#{project_name}' " \
133
+ "as a #{update_type} release (#{current_version(project_name)} => #{version})?")
134
+ abort('>> Cancelling Release.')
135
+ end
136
+
137
+ return unless Time.now.friday? && Time.now.hour >= 16
138
+ unless agree('>> Are you sure you want to deploy on late Friday afternoon? ' \
139
+ 'Did you think about your family...waiting for you at home?')
140
+ abort('>> Very good. Go home now.')
141
+ end
142
+ end
132
143
  end
@@ -1,5 +1,5 @@
1
1
  module Renuo
2
2
  module Cli
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '1.1.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renuo-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renuo AG
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-31 00:00:00.000000000 Z
11
+ date: 2018-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize