renuo-cli 0.2.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/lib/renuo/cli/app/create_heroku_app +3 -0
- data/lib/renuo/cli/app/fetch_all_emails +1 -1
- data/lib/renuo/cli/app/release_project.rb +16 -5
- data/lib/renuo/cli/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: b0cd1884a0ce0ad7e20d8470c415189ebe1597739c7c5cf1b6da46b6cca5afd2
|
4
|
+
data.tar.gz: 4fa496ce2e065343fdb773d7ea7b99cc36f05d7ff3d21e741e2d7b6b4fc79074
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
55
|
-
|
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
|
-
|
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
|
-
|
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
|
data/lib/renuo/cli/version.rb
CHANGED
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:
|
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-
|
11
|
+
date: 2018-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|