setup_script_generator 0.2.9 → 0.3.0
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: 9fa313219d3d72070f83b76129dfa4d88b201e6711c7bf4da9ee88743a2e73f0
|
4
|
+
data.tar.gz: f71b035c63680fca762ad81752bf711b239d71f5c4211983a13368e4c5471e6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05f56f7fab52cb6925f0fe26ab6aa865a7b9e8eb1bffdc9bcc0f9c22730d5edbff03268f77e2401915ac0248265d4895c43f73e25cf98f34e867187de733ca5d
|
7
|
+
data.tar.gz: 36579d3cd1018b4d740d845b8ecdee0b4f2441c12fab9105f3303e15949fb891da913175f3c0fbe461c61402f34cb28ff6306b867aa6cff054e31ab64110ee87
|
@@ -1,27 +1,17 @@
|
|
1
|
-
read-required-node-version-for-asdf() {
|
2
|
-
(cat .tool-versions | grep '^nodejs ' | sed -Ee 's/^nodejs (.+)$/\1/') || \
|
3
|
-
echo ''
|
4
|
-
}
|
5
|
-
|
6
1
|
provision-node() {
|
7
2
|
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
|
3
|
+
REQUIRED_NODE_VERSION=$(cat .tool-versions | grep '^nodejs ' | sed -Ee 's/^nodejs (.+)$/\1/')
|
16
4
|
elif [[ -f .node-version ]]; then
|
17
5
|
REQUIRED_NODE_VERSION=$(cat .node-version)
|
18
6
|
elif [[ -f .nvmrc ]]; then
|
19
7
|
REQUIRED_NODE_VERSION=$(cat .nvmrc)
|
20
|
-
|
21
|
-
|
8
|
+
fi
|
9
|
+
|
10
|
+
if [[ -z $REQUIRED_NODE_VERSION ]]; then
|
11
|
+
error "Could not determine required Node version for this project."
|
22
12
|
print-wrapped "\
|
23
|
-
|
24
|
-
|
13
|
+
Your project needs to include either a valid .tool-versions file with a 'nodejs'
|
14
|
+
line or a valid .node-version or .nvimrc file."
|
25
15
|
exit 1
|
26
16
|
fi
|
27
17
|
|
@@ -2,14 +2,16 @@ provision-ruby() {
|
|
2
2
|
USE_BUNDLER_1=0
|
3
3
|
|
4
4
|
if [[ -f .tool-versions ]]; then
|
5
|
-
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | sed -Ee 's/^ruby (.+)$/\1/')
|
5
|
+
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | head -n 1 | sed -Ee 's/^ruby (.+)$/\1/')
|
6
6
|
elif [[ -f .ruby-version ]]; then
|
7
|
-
REQUIRED_RUBY_VERSION=$(cat .ruby-version)
|
8
|
-
|
9
|
-
|
7
|
+
REQUIRED_RUBY_VERSION=$(cat .ruby-version | head -n 1 | sed -Ee 's/^ruby-([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)$/\1/')
|
8
|
+
fi
|
9
|
+
|
10
|
+
if [[ -z $REQUIRED_RUBY_VERSION ]]; then
|
11
|
+
error "Could not determine required Ruby version for this project."
|
10
12
|
print-wrapped "\
|
11
|
-
|
12
|
-
|
13
|
+
Your project needs to include either a valid .tool-versions file with a 'ruby'
|
14
|
+
line or a valid .ruby-version file."
|
13
15
|
exit 1
|
14
16
|
fi
|
15
17
|
|
@@ -51,12 +53,6 @@ ensure-ruby-installed() {
|
|
51
53
|
error "Please use chruby to install Ruby $REQUIRED_RUBY_VERSION!"
|
52
54
|
fi
|
53
55
|
fi
|
54
|
-
elif has-executable rvm; then
|
55
|
-
if ! (rvm list | grep $required_ruby_version'\>' &>/dev/null); then
|
56
|
-
banner "Installing Ruby $required_ruby_version with rvm"
|
57
|
-
rvm install $required_ruby_version
|
58
|
-
rvm use $required_ruby_version
|
59
|
-
fi
|
60
56
|
else
|
61
57
|
error "You don't seem to have a Ruby manager installed."
|
62
58
|
print-wrapped "\
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Winkler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|