Skip to content

Commit 25b59d8

Browse files
authored
Merge aws#5059 ci: allow commits during release automation
2 parents 391b2b8 + af802fe commit 25b59d8

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

buildspec/release/10changeversion.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ phases:
2424
VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);" | (IFS="-"; read -r version unused && echo "$version"))
2525
DATE=$(date)
2626
npm version --no-git-tag-version "$VERSION" -w packages/${TARGET_EXTENSION}
27-
# Call npm ci because 'createRelease' uses ts-node
28-
npm ci
27+
# 'createRelease' uses ts-node.
28+
# Ignore broken "postinstall" script in "src.gen/@amzn/codewhisperer-streaming/package.json".
29+
npm install --ignore-scripts ts-node
2930
- |
3031
npm run createRelease -w packages/${TARGET_EXTENSION}
3132
- |

buildspec/release/40pushtogithub.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ phases:
3636
git commit -m "Update version to snapshot version: ${VERSION}-SNAPSHOT"
3737
- |
3838
if [ "$STAGE" != "prod" ]; then
39-
echo "Stage is not production, skipping github push step"
39+
echo "SKIPPED (stage=${STAGE}): 'git push originWithCreds ${TARGET_BRANCH}'"
4040
exit 0
4141
fi
4242
echo "pushing to github"
43+
git fetch originWithCreds ${TARGET_BRANCH}
44+
git merge --no-edit -m "Merge release into ${TARGET_BRANCH}" FETCH_HEAD
4345
git push originWithCreds --tags
4446
git push originWithCreds ${TARGET_BRANCH}

buildspec/release/50githubrelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ phases:
4141
# note: the tag arg passed here should match what is in 10changeversion.yml
4242
gh release create --repo $REPO --title "$PKG_DISPLAY_NAME $VERSION" --notes "$RELEASE_MESSAGE" -- "${TARGET_EXTENSION}/v${VERSION}" "$UPLOAD_TARGET" "$HASH_UPLOAD_TARGET"
4343
else
44-
echo "SKIPPED: 'gh release create --repo $REPO'"
44+
echo "SKIPPED (stage=${STAGE}): 'gh release create --repo $REPO'"
4545
fi

buildspec/release/60publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ phases:
2828
- |
2929
echo "Publishing to vscode marketplace: $UPLOAD_TARGET"
3030
if [ "$STAGE" != "prod" ]; then
31-
echo "skipped (stage=${STAGE})"
31+
echo "SKIPPED (stage=${STAGE}): 'npx vsce publish --pat xxx --packagePath ${UPLOAD_TARGET}'"
3232
else
3333
npx vsce publish --pat "$VS_MARKETPLACE_PAT" --packagePath "$UPLOAD_TARGET"
3434
fi
3535
- |
3636
echo "Publishing to openvsx marketplace: $UPLOAD_TARGET"
3737
if [ "$STAGE" != "prod" ]; then
38-
echo "skipped (stage=${STAGE})"
38+
echo "SKIPPED (stage=${STAGE}): 'npx --yes ovsx publish --pat xxx "${UPLOAD_TARGET}"'"
3939
else
40-
npx --yes ovsx publish "$UPLOAD_TARGET" -p "$OVSX_PAT"
40+
npx --yes ovsx publish --pat "$OVSX_PAT" "$UPLOAD_TARGET"
4141
fi

0 commit comments

Comments
 (0)