diff --git a/.gitignore b/.gitignore index a289a2e..6547b1b 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,8 @@ debug # browser bundles # ###################### *bundle.js + +# misc # +.npmrc +*.tgz +.idea diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..c77af7f --- /dev/null +++ b/.npmignore @@ -0,0 +1,13 @@ +examples +node_modules +debug +.coverdata +.coverrun +.git +.github +continuous-delivery +integration-testing +test +reports +.npmrc +.idea diff --git a/CHANGELOG.md b/CHANGELOG.md index 93ff642..bfbb1c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.2.9](https://github.com/aws/aws-iot-device-sdk-js/releases/tag/v2.2.9) (July 8, 2021) + +Bugfixes/Improvements + - Updated crypto-js version + - Updated mqtt-js version + - Removed reserved topic checks from subscribe calls + ## [2.2.8](https://github.com/aws/aws-iot-device-sdk-js/releases/tag/v2.2.8) (May 20, 2021) Bugfixes/Improvements diff --git a/continuous-delivery/publish.yml b/continuous-delivery/publish.yml new file mode 100644 index 0000000..b4ae9be --- /dev/null +++ b/continuous-delivery/publish.yml @@ -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 diff --git a/continuous-delivery/test-version-exists.sh b/continuous-delivery/test-version-exists.sh new file mode 100755 index 0000000..f642fe3 --- /dev/null +++ b/continuous-delivery/test-version-exists.sh @@ -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 diff --git a/continuous-delivery/test-version-exists.yml b/continuous-delivery/test-version-exists.yml new file mode 100644 index 0000000..8491473 --- /dev/null +++ b/continuous-delivery/test-version-exists.yml @@ -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 + diff --git a/continuous-delivery/update-version.sh b/continuous-delivery/update-version.sh new file mode 100755 index 0000000..359b772 --- /dev/null +++ b/continuous-delivery/update-version.sh @@ -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 diff --git a/package.json b/package.json index eb6cbac..79796d3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "aws-iot-device-sdk", "description": "AWS IoT Node.js SDK for Embedded Devices", - "version": "2.2.8", + "version": "2.0.0-dev", "author": { "name": "Amazon Web Services", "email": "",