forger 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/forger/script/upload.rb +2 -1
- data/lib/forger/scripts/auto_terminate/setup.sh +3 -5
- data/lib/forger/scripts/shared/functions.sh +3 -5
- data/lib/forger/version.rb +1 -1
- data/lib/templates/default/app/scripts/shared/functions.sh +3 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b57dbd9ed6cebe6d22408d9eedc61c2a4f0398ee4d37f806f293a91344c2caf6
|
4
|
+
data.tar.gz: f5a6ac3e67e166cd1a12e4abb10b0080b4912ae51fb41d170de9cd76690d5e0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8f11584373cedf9d2c8f20c05219d9094c65b081669210b045a55ce4ef87cde4b575e10dce7ef34670ab3fd16b0f8859dd3be8fced63189233c5a22b6a8359f
|
7
|
+
data.tar.gz: 3c99722189cf579ff8f2b943bf17f0d5fd543242d6a2e5e9b13ddda807986b5ca47e684dbb0b5481781b7f802de959b03e1d7497575b1b4792d137a7baac3421
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [2.0.1]
|
7
|
+
- Merge pull request #13 from tongueroo/aws-config-fix
|
8
|
+
- configure_aws_cli: always write ~/.aws/config
|
9
|
+
- fix s3 folder path when at top level of bucket
|
10
|
+
|
6
11
|
## [2.0.0]
|
7
12
|
- Merge pull request #11 and #12 from tongueroo/new:
|
8
13
|
- forger new: creates a starter project that works right off the bat
|
data/Gemfile.lock
CHANGED
data/lib/forger/script/upload.rb
CHANGED
@@ -88,7 +88,8 @@ class Forger::Script
|
|
88
88
|
# bucket_name: ec2/development/scripts
|
89
89
|
def dest_folder
|
90
90
|
folder = s3_folder.sub('s3://','').split('/')[1..-1].join('/')
|
91
|
-
|
91
|
+
folder = nil if folder == ''
|
92
|
+
[folder, "#{Forger.env}/scripts"].compact.join('/')
|
92
93
|
end
|
93
94
|
|
94
95
|
# s3_folder example:
|
@@ -12,15 +12,13 @@ function configure_aws_cli() {
|
|
12
12
|
home_dir=${1:-/root} # default to /root
|
13
13
|
# Configure aws cli in case it is not yet configured
|
14
14
|
mkdir -p "$home_dir/.aws"
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
cat >"$home_dir/.aws/config" <<CONFIGURE_AWS_CLI
|
15
|
+
EC2_AVAIL_ZONE=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)
|
16
|
+
EC2_REGION=${EC2_AVAIL_ZONE::-1}
|
17
|
+
cat >"$home_dir/.aws/config" <<CONFIGURE_AWS_CLI
|
19
18
|
[default]
|
20
19
|
region = $EC2_REGION
|
21
20
|
output = json
|
22
21
|
CONFIGURE_AWS_CLI
|
23
|
-
fi
|
24
22
|
}
|
25
23
|
|
26
24
|
function setup() {
|
@@ -5,15 +5,13 @@ function configure_aws_cli() {
|
|
5
5
|
home_dir=${1:-/root} # default to /root
|
6
6
|
# Configure aws cli in case it is not yet configured
|
7
7
|
mkdir -p "$home_dir/.aws"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
cat >"$home_dir/.aws/config" <<CONFIGURE_AWS_CLI
|
8
|
+
EC2_AVAIL_ZONE=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)
|
9
|
+
EC2_REGION=${EC2_AVAIL_ZONE::-1}
|
10
|
+
cat >"$home_dir/.aws/config" <<CONFIGURE_AWS_CLI
|
12
11
|
[default]
|
13
12
|
region = $EC2_REGION
|
14
13
|
output = json
|
15
14
|
CONFIGURE_AWS_CLI
|
16
|
-
fi
|
17
15
|
}
|
18
16
|
|
19
17
|
# Normalize os name so we can delegate out to os specific scripts.
|
data/lib/forger/version.rb
CHANGED
@@ -10,13 +10,11 @@ function configure_aws_cli() {
|
|
10
10
|
local home_dir=$1
|
11
11
|
# Configure aws cli in case it is not yet configured
|
12
12
|
mkdir -p "$home_dir/.aws"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
cat >"$home_dir/.aws/config" <<CONFIGURE_AWS_CLI
|
13
|
+
EC2_AVAIL_ZONE=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)
|
14
|
+
EC2_REGION=${EC2_AVAIL_ZONE::-1}
|
15
|
+
cat >"$home_dir/.aws/config" <<CONFIGURE_AWS_CLI
|
17
16
|
[default]
|
18
17
|
region = $EC2_REGION
|
19
18
|
output = json
|
20
19
|
CONFIGURE_AWS_CLI
|
21
|
-
fi
|
22
20
|
}
|