Skip to content

Commit 9500a18

Browse files
author
Elad Ben-Israel
authored
chore: upgrade projen (#83)
1 parent a69e9da commit 9500a18

File tree

16 files changed

+183
-92
lines changed

16 files changed

+183
-92
lines changed

.eslintrc.json

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gitattributes

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/build.yml

Lines changed: 15 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/projenupgrade.yml

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/release.yml

Lines changed: 20 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
.eslintcache
1111
.nyc_output
1212
.yarn-integrity
13+
/.changelog.tmp.md
14+
/.version.tmp.json
1315
/coverage
1416
/dist
1517
/lib
@@ -28,9 +30,11 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
2830
yarn-debug.log*
2931
yarn-error.log*
3032
!/.eslintrc.json
33+
!/.gitattributes
3134
!/.github/dependabot.yml
3235
!/.github/pull_request_template.md
3336
!/.github/workflows/build.yml
37+
!/.github/workflows/projenupgrade.yml
3438
!/.github/workflows/release.yml
3539
!/.mergify.yml
3640
!/.npmignore
@@ -45,4 +49,3 @@ yarn-error.log*
4549
!/tsconfig.eslint.json
4650
!/tsconfig.jest.json
4751
!/tsconfig.json
48-
!version.json

.npmignore

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/deps.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
},
4949
{
5050
"name": "projen",
51-
"version": "^0.17.16",
51+
"version": "^0.17.88",
5252
"type": "build"
5353
},
5454
{

.projen/tasks.json

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,33 @@
3333
],
3434
"condition": "git diff --exit-code > /dev/null"
3535
},
36+
"bump": {
37+
"name": "bump",
38+
"category": "20.release",
39+
"description": "Bumps version based on latest git tag and generates a changelog entry",
40+
"steps": [
41+
{
42+
"exec": "git -c \"versionsort.suffix=-\" tag --sort=\"-version:refname\" --list \"v*\" | head -n1 > .version.tmp.json"
43+
},
44+
{
45+
"exec": "if [ \"$(cat .version.tmp.json)\" == \"\" ]; then echo \"v0.1.0\" > .version.tmp.json; fi"
46+
},
47+
{
48+
"exec": "standard-version"
49+
}
50+
],
51+
"condition": "! git log --oneline -1 | grep -q \"chore(release):\""
52+
},
53+
"unbump": {
54+
"name": "unbump",
55+
"category": "20.release",
56+
"description": "Restores version to 0.0.0",
57+
"steps": [
58+
{
59+
"exec": "standard-version -r 0.0.0"
60+
}
61+
]
62+
},
3663
"compile": {
3764
"name": "compile",
3865
"category": "00.build",
@@ -77,6 +104,9 @@
77104
"category": "00.build",
78105
"description": "Full release build (test+compile)",
79106
"steps": [
107+
{
108+
"exec": "npx projen"
109+
},
80110
{
81111
"spawn": "test"
82112
},
@@ -97,31 +127,6 @@
97127
}
98128
]
99129
},
100-
"bump": {
101-
"name": "bump",
102-
"category": "20.release",
103-
"description": "Commits a bump to the package version based on conventional commits",
104-
"steps": [
105-
{
106-
"exec": "standard-version"
107-
}
108-
],
109-
"condition": "! git log --oneline -1 | grep -q \"chore(release):\""
110-
},
111-
"release": {
112-
"name": "release",
113-
"category": "20.release",
114-
"description": "Bumps version & push to master",
115-
"steps": [
116-
{
117-
"spawn": "bump"
118-
},
119-
{
120-
"exec": "git push --follow-tags origin master"
121-
}
122-
],
123-
"condition": "! git log --oneline -1 | grep -q \"chore(release):\""
124-
},
125130
"test:watch": {
126131
"name": "test:watch",
127132
"category": "10.test",
@@ -155,6 +160,14 @@
155160
}
156161
]
157162
},
163+
"default": {
164+
"name": "default",
165+
"steps": [
166+
{
167+
"exec": "node .projenrc.js"
168+
}
169+
]
170+
},
158171
"watch": {
159172
"name": "watch",
160173
"category": "00.build",

.projenrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const project = new TypeScriptProject({
1111
authorOrganization: true,
1212
authorUrl: 'https://aws.amazon.com',
1313
homepage: 'https://github.com/aws/jsii-release',
14+
projenUpgradeSecret: 'PROJEN_GITHUB_TOKEN',
1415
});
1516

1617
// create tarball and move to dist/js so release workflow can pick it up from there.

0 commit comments

Comments
 (0)