setup_script_generator 0.2.8 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 414b35d4fd8fcc955edbd48c07adf9cb6a58b1268ab535a4b19793efc95ddb6c
|
4
|
+
data.tar.gz: 6fb7d8ca9db2ccdeb09a977e8aaf29ff61621c60541ea50913511bd6cfcad3de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0962104490d7df6439779e62e9dd7e417d087d34ec4cd52857075bcfe6fd0ab0b337178e4354ae8c9fdad93fcdabcf7df999c676de6fe713728f499393034f21'
|
7
|
+
data.tar.gz: 9fde5cadf9262ff46f34e2a479d8a9e02106a0f857fb18c84f5046072da15bdd9c7d726a815be46e563a4cc29a8ef1473d9201b9efd035e4fecf939e8e0caa6e
|
data/bin/setup
CHANGED
@@ -17,7 +17,7 @@ provision-project() {
|
|
17
17
|
|
18
18
|
### DON'T MODIFY ANYTHING BELOW THIS LINE! #####################################
|
19
19
|
|
20
|
-
# This setup script was generated with setup_script_generator 0.
|
20
|
+
# This setup script was generated with setup_script_generator 0.4.1,
|
21
21
|
# available on RubyGems.
|
22
22
|
#
|
23
23
|
# To regenerate this section, install the gem and run:
|
@@ -186,24 +186,31 @@ setup() {
|
|
186
186
|
|
187
187
|
# --- RUBY ---------------------------------------------------------------------
|
188
188
|
|
189
|
+
REQUIRED_RUBY_VERSION=
|
190
|
+
|
189
191
|
provision-ruby() {
|
190
192
|
USE_BUNDLER_1=0
|
191
193
|
|
192
194
|
if [[ -f .tool-versions ]]; then
|
193
|
-
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | sed -Ee 's/^ruby (.+)$/\1/')
|
195
|
+
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | head -n 1 | sed -Ee 's/^ruby (.+)$/\1/')
|
194
196
|
elif [[ -f .ruby-version ]]; then
|
195
|
-
REQUIRED_RUBY_VERSION=$(cat .ruby-version)
|
196
|
-
|
197
|
-
|
197
|
+
REQUIRED_RUBY_VERSION=$(cat .ruby-version | head -n 1 | sed -Ee 's/^ruby-([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)$/\1/')
|
198
|
+
fi
|
199
|
+
|
200
|
+
if [[ -z $REQUIRED_RUBY_VERSION ]]; then
|
201
|
+
error "Could not determine required Ruby version for this project."
|
198
202
|
print-wrapped "\
|
199
|
-
|
200
|
-
|
203
|
+
Your project needs to include either a valid .tool-versions file with a 'ruby'
|
204
|
+
line or a valid .ruby-version file."
|
201
205
|
exit 1
|
202
206
|
fi
|
203
207
|
|
204
208
|
ensure-ruby-development-libraries-installed
|
205
209
|
ensure-ruby-installed
|
206
|
-
|
210
|
+
|
211
|
+
if [[ -f Gemfile ]]; then
|
212
|
+
ensure-project-ruby-dependencies-installed
|
213
|
+
fi
|
207
214
|
}
|
208
215
|
|
209
216
|
ensure-ruby-development-libraries-installed() {
|
@@ -237,10 +244,9 @@ ensure-ruby-installed() {
|
|
237
244
|
fi
|
238
245
|
fi
|
239
246
|
elif has-executable rvm; then
|
240
|
-
if ! (rvm list | grep $
|
241
|
-
banner "Installing Ruby $
|
242
|
-
rvm install $
|
243
|
-
rvm use $required_ruby_version
|
247
|
+
if ! (rvm list | grep $REQUIRED_RUBY_VERSION'\>' &>/dev/null); then
|
248
|
+
banner "Installing Ruby $REQUIRED_RUBY_VERSION with rvm"
|
249
|
+
rvm install $REQUIRED_RUBY_VERSION
|
244
250
|
fi
|
245
251
|
else
|
246
252
|
error "You don't seem to have a Ruby manager installed."
|
@@ -261,8 +267,8 @@ has-bundler() {
|
|
261
267
|
ensure-project-ruby-dependencies-installed() {
|
262
268
|
banner 'Installing Ruby dependencies'
|
263
269
|
|
264
|
-
if [[ $USE_BUNDLER_1 -eq 1 ]] && (! has-bundler || [[ $(bundle -v) =~ '^1\.' ]]); then
|
265
|
-
gem install bundler
|
270
|
+
if [[ $USE_BUNDLER_1 -eq 1 ]] && (! has-bundler || ! [[ $(bundle -v) =~ '^Bundler version 1\.' ]]); then
|
271
|
+
gem install bundler:'~> 1.0'
|
266
272
|
elif ! has-bundler; then
|
267
273
|
gem install bundler
|
268
274
|
fi
|
@@ -272,10 +278,6 @@ ensure-project-ruby-dependencies-installed() {
|
|
272
278
|
|
273
279
|
run-provisions() {
|
274
280
|
provision-ruby
|
275
|
-
|
276
|
-
if type provision-project &>/dev/null; then
|
277
|
-
provision-project
|
278
|
-
fi
|
279
281
|
}
|
280
282
|
|
281
283
|
# --- FIN ----------------------------------------------------------------------
|
@@ -1,27 +1,19 @@
|
|
1
|
-
|
2
|
-
(cat .tool-versions | grep '^nodejs ' | sed -Ee 's/^nodejs (.+)$/\1/') || \
|
3
|
-
echo ''
|
4
|
-
}
|
1
|
+
REQUIRED_NODE_VERSION=
|
5
2
|
|
6
3
|
provision-node() {
|
7
4
|
if [[ -f .tool-versions ]]; then
|
8
|
-
REQUIRED_NODE_VERSION=$(
|
9
|
-
|
10
|
-
if [[ -z $REQUIRED_NODE_VERSION ]]; then
|
11
|
-
error "Could not read required Node version."
|
12
|
-
print-wrapped "\
|
13
|
-
Please check that .tool-versions is correct before re-running this script."
|
14
|
-
exit 1
|
15
|
-
fi
|
5
|
+
REQUIRED_NODE_VERSION=$(cat .tool-versions | grep '^nodejs ' | sed -Ee 's/^nodejs (.+)$/\1/')
|
16
6
|
elif [[ -f .node-version ]]; then
|
17
7
|
REQUIRED_NODE_VERSION=$(cat .node-version)
|
18
8
|
elif [[ -f .nvmrc ]]; then
|
19
9
|
REQUIRED_NODE_VERSION=$(cat .nvmrc)
|
20
|
-
|
21
|
-
|
10
|
+
fi
|
11
|
+
|
12
|
+
if [[ -z $REQUIRED_NODE_VERSION ]]; then
|
13
|
+
error "Could not determine required Node version for this project."
|
22
14
|
print-wrapped "\
|
23
|
-
|
24
|
-
|
15
|
+
Your project needs to include either a valid .tool-versions file with a 'nodejs'
|
16
|
+
line or a valid .node-version or .nvimrc file."
|
25
17
|
exit 1
|
26
18
|
fi
|
27
19
|
|
@@ -1,21 +1,28 @@
|
|
1
|
+
REQUIRED_RUBY_VERSION=
|
2
|
+
|
1
3
|
provision-ruby() {
|
2
4
|
USE_BUNDLER_1=0
|
3
5
|
|
4
6
|
if [[ -f .tool-versions ]]; then
|
5
|
-
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | sed -Ee 's/^ruby (.+)$/\1/')
|
7
|
+
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | head -n 1 | sed -Ee 's/^ruby (.+)$/\1/')
|
6
8
|
elif [[ -f .ruby-version ]]; then
|
7
|
-
REQUIRED_RUBY_VERSION=$(cat .ruby-version)
|
8
|
-
|
9
|
-
|
9
|
+
REQUIRED_RUBY_VERSION=$(cat .ruby-version | head -n 1 | sed -Ee 's/^ruby-([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)$/\1/')
|
10
|
+
fi
|
11
|
+
|
12
|
+
if [[ -z $REQUIRED_RUBY_VERSION ]]; then
|
13
|
+
error "Could not determine required Ruby version for this project."
|
10
14
|
print-wrapped "\
|
11
|
-
|
12
|
-
|
15
|
+
Your project needs to include either a valid .tool-versions file with a 'ruby'
|
16
|
+
line or a valid .ruby-version file."
|
13
17
|
exit 1
|
14
18
|
fi
|
15
19
|
|
16
20
|
ensure-ruby-development-libraries-installed
|
17
21
|
ensure-ruby-installed
|
18
|
-
|
22
|
+
|
23
|
+
if [[ -f Gemfile ]]; then
|
24
|
+
ensure-project-ruby-dependencies-installed
|
25
|
+
fi
|
19
26
|
}
|
20
27
|
|
21
28
|
ensure-ruby-development-libraries-installed() {
|
@@ -49,10 +56,9 @@ ensure-ruby-installed() {
|
|
49
56
|
fi
|
50
57
|
fi
|
51
58
|
elif has-executable rvm; then
|
52
|
-
if ! (rvm list | grep $
|
53
|
-
banner "Installing Ruby $
|
54
|
-
rvm install $
|
55
|
-
rvm use $required_ruby_version
|
59
|
+
if ! (rvm list | grep $REQUIRED_RUBY_VERSION'\>' &>/dev/null); then
|
60
|
+
banner "Installing Ruby $REQUIRED_RUBY_VERSION with rvm"
|
61
|
+
rvm install $REQUIRED_RUBY_VERSION
|
56
62
|
fi
|
57
63
|
else
|
58
64
|
error "You don't seem to have a Ruby manager installed."
|
@@ -74,7 +80,7 @@ ensure-project-ruby-dependencies-installed() {
|
|
74
80
|
banner 'Installing Ruby dependencies'
|
75
81
|
|
76
82
|
if [[ $USE_BUNDLER_1 -eq 1 ]] && (! has-bundler || ! [[ $(bundle -v) =~ '^Bundler version 1\.' ]]); then
|
77
|
-
gem install bundler
|
83
|
+
gem install bundler:'~> 1.0'
|
78
84
|
elif ! has-bundler; then
|
79
85
|
gem install bundler
|
80
86
|
fi
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: setup_script_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Winkler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|