Skip to content

Commit

Permalink
chore: fix postinstall failure for windows (aws-amplify#2572)
Browse files Browse the repository at this point in the history
* chore: fix postinstall failure for windows

* chore: linting fix
  • Loading branch information
phani-srikar authored May 22, 2024
1 parent bd8debf commit 6649126
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/1.gen2_bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ body:
Please include any code snippets or screenshots that you think would be helpful!
validations:
required: true

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions shared-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 6649126

Please sign in to comment.