Skip to content

Commit

Permalink
chore: upgrade projen (#460)
Browse files Browse the repository at this point in the history
Co-authored-by: eladb <[email protected]>
  • Loading branch information
aws-cdk-automation and eladb authored Apr 21, 2021
1 parent 0be5986 commit 78037bd
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: yarn install --check-files --frozen-lockfile
- name: Set git identity
run: |-
git config user.name "Auto-bump"
git config user.name "Automation"
git config user.email "[email protected]"
- name: Build
run: npx projen build
Expand Down
39 changes: 27 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:
- main
workflow_dispatch: {}
jobs:
build:
release:
runs-on: ubuntu-latest
env:
CI: "true"
RELEASE: "true"
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -19,31 +20,45 @@ jobs:
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: Anti-tamper check
run: git diff --exit-code
run: git diff --ignore-space-at-eol --exit-code
- name: Set git identity
run: |-
git config user.name "Auto-bump"
git config user.name "Automation"
git config user.email "[email protected]"
- name: Bump to next version
run: npx projen bump
- name: Install GitHub CLI
run: curl -sL
https://github.com/cli/cli/releases/download/v1.9.2/gh_1.9.2_linux_amd64.tar.gz
| tar -xzv --strip-components=2 gh_1.9.2_linux_amd64/bin/gh && mv gh
/usr/bin/
- name: Build
run: npx projen build
- name: Anti-tamper check
run: git diff --exit-code
- name: Push commits
run: git push origin HEAD:${{ github.ref }}
- name: Push tags
run: git push --follow-tags origin ${{ github.ref }}
- name: Check for new commits
id: git_remote
run: echo ::set-output name=latest_commit::"$(git ls-remote origin -h ${{
github.ref }} | cut -f1)"
- name: Create release
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }}
run: gh release create v$(node -p "require('./package.json').version") -F
changelog.tmp.md -t v$(node -p "require('./package.json').version")
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Unbump
run: npx projen unbump
- name: Upload artifact
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }}
uses: actions/[email protected]
with:
name: dist
path: dist
- name: Anti-tamper check
run: git diff --ignore-space-at-eol --exit-code
container:
image: jsii/superchain
release_npm:
name: Release to NPM
needs: build
needs: release
runs-on: ubuntu-latest
container:
image: jsii/superchain
Expand All @@ -61,7 +76,7 @@ jobs:
NPM_REGISTRY: registry.npmjs.org
release_maven:
name: Release to Maven
needs: build
needs: release
runs-on: ubuntu-latest
container:
image: jsii/superchain
Expand All @@ -81,7 +96,7 @@ jobs:
MAVEN_STAGING_PROFILE_ID: ${{ secrets.MAVEN_STAGING_PROFILE_ID }}
release_pypi:
name: Release to PyPi
needs: build
needs: release
runs-on: ubuntu-latest
container:
image: jsii/superchain
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ yarn-error.log*
!/test
!/tsconfig.eslint.json
!/tsconfig.jest.json
!version.json
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/.mergify.yml
/.projen
/.projenrc.js
/.versionrc.json
/.vscode
/coverage
/src
Expand Down
2 changes: 1 addition & 1 deletion .projen/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
},
{
"name": "projen",
"version": "^0.17.51",
"version": "^0.17.54",
"type": "build"
},
{
Expand Down
46 changes: 21 additions & 25 deletions .projen/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,27 @@
],
"condition": "git diff --exit-code > /dev/null"
},
"bump": {
"name": "bump",
"category": "20.release",
"description": "Bumps version based on latest git tag and generates a changelog entry",
"steps": [
{
"exec": "standard-version"
}
],
"condition": "! git log --oneline -1 | grep -q \"chore(release):\""
},
"unbump": {
"name": "unbump",
"category": "20.release",
"description": "Restores version to 0.0.0",
"steps": [
{
"exec": "standard-version -r 0.0.0"
}
]
},
"compile": {
"name": "compile",
"category": "00.build",
Expand Down Expand Up @@ -94,31 +115,6 @@
}
]
},
"bump": {
"name": "bump",
"category": "20.release",
"description": "Commits a bump to the package version based on conventional commits",
"steps": [
{
"exec": "standard-version"
}
],
"condition": "! git log --oneline -1 | grep -q \"chore(release):\""
},
"release": {
"name": "release",
"category": "20.release",
"description": "Bumps version & push to main",
"steps": [
{
"spawn": "bump"
},
{
"exec": "git push --follow-tags origin main"
}
],
"condition": "! git log --oneline -1 | grep -q \"chore(release):\""
},
"test:watch": {
"name": "test:watch",
"category": "10.test",
Expand Down
21 changes: 8 additions & 13 deletions .versionrc.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{
"packageFiles": [
{
"filename": "version.json",
"type": "json"
}
],
"packageFiles": [],
"bumpFiles": [
{
"filename": "version.json",
"type": "json"
}
"package.json"
],
"commitAll": true,
"scripts": {
"postbump": "npx projen && git add ."
"commitAll": false,
"infile": "changelog.tmp.md",
"header": "",
"skip": {
"commit": true,
"tag": true
},
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"."
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
},
"scripts": {
"clobber": "npx projen clobber",
"bump": "npx projen bump",
"unbump": "npx projen unbump",
"compile": "npx projen compile",
"test:compile": "npx projen test:compile",
"test": "npx projen test",
"build": "npx projen build",
"bump": "npx projen bump",
"release": "npx projen release",
"test:watch": "npx projen test:watch",
"test:update": "npx projen test:update",
"projen:upgrade": "npx projen projen:upgrade",
Expand Down Expand Up @@ -47,7 +47,7 @@
"jsii-docgen": "^1.3.2",
"jsii-pacmak": "^1.7.0",
"json-schema": "^0.2.5",
"projen": "^0.17.51",
"projen": "^0.17.54",
"projen-automate-it": "^0.0.8",
"standard-version": "^9",
"ts-jest": "^26.1.0",
Expand Down Expand Up @@ -96,7 +96,7 @@
],
"main": "lib/index.js",
"license": "Apache-2.0",
"version": "0.5.127",
"version": "0.0.0",
"jest": {
"testMatch": [
"**/__tests__/**/*.ts?(x)",
Expand Down
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1709,9 +1709,9 @@ available-typed-arrays@^1.0.2:
array-filter "^1.0.0"

aws-sdk@^2.708.0:
version "2.889.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.889.0.tgz#513457f488305a8ff5593747741b67e7b874bdf7"
integrity sha512-+v77GmIJKXT3GMDg/HF9x8c7RSVU8Imfp/0n0Tuzf5AAE6eavpD3xzHABiK9zO9f+T8XzJDytl66UQ33YXavng==
version "2.890.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.890.0.tgz#95b6a2dc36d324a40ef4c9462bde111d1ff7c234"
integrity sha512-39rVXw0aJVnBpVSbZ6ZBaNop8VwkNKx9n+auxQdNnAJtJ9dftgWo4AZYXg0a5lMxIL7AmnlPXWAVPOWHvCeuJg==
dependencies:
buffer "4.9.2"
events "1.1.1"
Expand Down Expand Up @@ -1991,9 +1991,9 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2:
supports-color "^5.3.0"

chalk@^4.0.0, chalk@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
version "4.1.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad"
integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
Expand Down Expand Up @@ -2647,9 +2647,9 @@ ecc-jsbn@~0.1.1:
safer-buffer "^2.1.0"

electron-to-chromium@^1.3.712:
version "1.3.717"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.717.tgz#78d4c857070755fb58ab64bcc173db1d51cbc25f"
integrity sha512-OfzVPIqD1MkJ7fX+yTl2nKyOE4FReeVfMCzzxQS+Kp43hZYwHwThlGP+EGIZRXJsxCM7dqo8Y65NOX/HP12iXQ==
version "1.3.719"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.719.tgz#87166fee347a46a2557f19aadb40a1d68241e61c"
integrity sha512-heM78GKSqrIzO9Oz0/y22nTBN7bqSP1Pla2SyU9DiSnQD+Ea9SyyN5RWWlgqsqeBLNDkSlE9J9EHFmdMPzxB/g==

emittery@^0.7.1:
version "0.7.2"
Expand Down Expand Up @@ -5471,10 +5471,10 @@ projen-automate-it@^0.0.8:
dependencies:
projen "^0.17"

projen@^0.17, projen@^0.17.51:
version "0.17.51"
resolved "https://registry.yarnpkg.com/projen/-/projen-0.17.51.tgz#f2973255d7ace02ab94804ce3ac9b1c62f1e050d"
integrity sha512-bQduJiFvWwI4yhWn6I+Z3oG6XOgPYbEKzrewXG20IpQ/CVpOOdr9uuiEZQ24eVZrjZJ3gbxcO54d1lmNpf5WZA==
projen@^0.17, projen@^0.17.54:
version "0.17.54"
resolved "https://registry.yarnpkg.com/projen/-/projen-0.17.54.tgz#032dd939a53b9b936e7620abad83174c992a26bd"
integrity sha512-6PBXHmtoa5mPL/gI4uVl9e9bLp2Ka51LUQ8PPXnR+SdZarzP8N2/H9QJ2+8OsPdaRIHWB1G8/++2DdHoRSlx+Q==
dependencies:
"@iarna/toml" "^2.2.5"
chalk "^4.1.0"
Expand Down

0 comments on commit 78037bd

Please sign in to comment.