-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,8 @@ debug | |
# browser bundles # | ||
###################### | ||
*bundle.js | ||
|
||
# misc # | ||
.npmrc | ||
*.tgz | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
examples | ||
node_modules | ||
debug | ||
.coverdata | ||
.coverrun | ||
.git | ||
.github | ||
continuous-delivery | ||
integration-testing | ||
test | ||
reports | ||
.npmrc | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 0.2 | ||
phases: | ||
install: | ||
runtime-versions: | ||
nodejs: 10 | ||
pre_build: | ||
commands: | ||
- cd $CODEBUILD_SRC_DIR/aws-iot-device-sdk-js | ||
- bash ./continuous-delivery/update-version.sh | ||
build: | ||
commands: | ||
- aws secretsmanager get-secret-value --secret-id V1JavascriptNpmAuthToken --region us-east-1 | jq -r .SecretString > .npmrc | ||
- npm install | ||
- npm pack | ||
- npm --userconfig ./.npmrc publish aws-iot-device-sdk-*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
# force a failure if there's no tag | ||
git describe --tags | ||
# now get the tag | ||
CURRENT_TAG=$(git describe --tags | cut -f2 -dv) | ||
# convert v0.2.12-2-g50254a9 to 0.2.12 | ||
CURRENT_TAG_VERSION=$(git describe --tags | cut -f1 -d'-' | cut -f2 -dv) | ||
# if there's a hash on the tag, then this is not a release tagged commit | ||
if [ "$CURRENT_TAG" != "$CURRENT_TAG_VERSION" ]; then | ||
echo "Current tag version is not a release tag, cut a new release if you want to publish." | ||
exit 1 | ||
fi | ||
|
||
PUBLISHED_TAG_VERSION=`npm show aws-iot-device-sdk version` | ||
if [ "$PUBLISHED_TAG_VERSION" == "$CURRENT_TAG_VERSION" ]; then | ||
echo "$CURRENT_TAG_VERSION is already in npm, cut a new tag if you want to upload another version." | ||
exit 1 | ||
fi | ||
|
||
echo "$CURRENT_TAG_VERSION currently does not exist in npm, allowing pipeline to continue." | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 0.2 | ||
phases: | ||
install: | ||
runtime-versions: | ||
nodejs: 10 | ||
build: | ||
commands: | ||
- cd $CODEBUILD_SRC_DIR/aws-iot-device-sdk-js | ||
- bash ./continuous-delivery/test-version-exists.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
# force a failure if there's no tag | ||
git describe --tags | ||
# now get the tag | ||
CURRENT_TAG=$(git describe --tags | cut -f2 -dv) | ||
# convert v0.2.12-2-g50254a9 to 0.2.12 | ||
CURRENT_TAG_VERSION=$(git describe --tags | cut -f1 -d'-' | cut -f2 -dv) | ||
# if there's a hash on the tag, then this is not a release tagged commit | ||
if [ "$CURRENT_TAG" != "$CURRENT_TAG_VERSION" ]; then | ||
echo "Current tag version is not a release tag, cut a new release if you want to publish." | ||
exit 1 | ||
fi | ||
|
||
sed --in-place -E "s/\"version\": \".+\"/\"version\": \"${CURRENT_TAG_VERSION}\"/" package.json | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters