diff --git a/.github/ISSUE_TEMPLATE/1.gen2_bug_report.yaml b/.github/ISSUE_TEMPLATE/1.gen2_bug_report.yaml index adeb7020c9..43e24f2097 100644 --- a/.github/ISSUE_TEMPLATE/1.gen2_bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/1.gen2_bug_report.yaml @@ -40,4 +40,3 @@ body: Please include any code snippets or screenshots that you think would be helpful! validations: required: true - diff --git a/package.json b/package.json index 68adf62c2e..523cd777f1 100644 --- a/package.json +++ b/package.json @@ -66,8 +66,7 @@ "verify-yarn-lock": "./scripts/verify-yarn-lock.sh", "view-test-artifact": "./scripts/view-test-artifacts.sh", "view-test-artifacts": "yarn authenticate-e2e-profile && yarn ts-node --project ./scripts/tsconfig.json ./scripts/view-test-artifacts.ts", - "yarn-use-bash": "yarn config set script-shell /bin/bash", - "postinstall": "./scripts/postinstall.sh" + "yarn-use-bash": "yarn config set script-shell /bin/bash" }, "bugs": { "url": "https://github.com/aws-amplify/amplify-category-api/issues" diff --git a/scripts/postinstall.sh b/scripts/create-private-package-manifest.sh similarity index 60% rename from scripts/postinstall.sh rename to scripts/create-private-package-manifest.sh index c779511300..65fa57533f 100755 --- a/scripts/postinstall.sh +++ b/scripts/create-private-package-manifest.sh @@ -1,5 +1,11 @@ #!/bin/bash +# set exit on error to true +set -e + +# create a new file to store the private packages +# this will be imported and used in the Git Client to determine the packages to deprecate + echo 'export default [' > scripts/components/private_packages.ts grep -l packages/*/package.json -e '"private": "\?true"\?' | xargs cat | jq .name | tr -s '\n' ',' >> scripts/components/private_packages.ts echo '];' >> scripts/components/private_packages.ts diff --git a/shared-scripts.sh b/shared-scripts.sh index 3b8823ccf6..5160eb875b 100755 --- a/shared-scripts.sh +++ b/shared-scripts.sh @@ -462,6 +462,9 @@ function _deploy { function _deprecate { loadCacheFromBuildJob echo "Deprecate" + + echo "creating private package manifest" + ./scripts/create-private-package-manifest.sh echo "Authenticate with NPM" if [ "$USE_NPM_REGISTRY" == "true" ]; then PUBLISH_TOKEN=$(echo "$NPM_PUBLISH_TOKEN" | jq -r '.token')