aws-delivlib 13.1.1 → 13.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,7 @@ if (!process.env.GITHUB_OWNER) { throw new Error('GITHUB_OWNER is required'); }
12
12
 
13
13
  const build_manifest = process.env.BUILD_MANIFEST || './build.json';
14
14
  const changelog_file = process.env.CHANGELOG || './CHANGELOG.md';
15
+ const release_notes_file = process.env.RELEASE_NOTES || './RELEASE_NOTES.md';
15
16
 
16
17
  const client = github.client(process.env.GITHUB_TOKEN);
17
18
 
@@ -31,6 +32,14 @@ async function release_exists(repository, tag_name) {
31
32
  });
32
33
  }
33
34
 
35
+ async function read_release_notes() {
36
+ if (!await exists(release_notes_file)) {
37
+ return undefined;
38
+ }
39
+
40
+ return fs.readFile(release_notes_file, 'utf8');
41
+ }
42
+
34
43
  async function read_changelog(version) {
35
44
  if (!await exists(changelog_file)) {
36
45
  return undefined;
@@ -101,11 +110,16 @@ async function main() {
101
110
  return;
102
111
  }
103
112
 
104
- console.log('reading changelog...');
105
- const changelog = await read_changelog(manifest.version);
113
+ console.log('reading release notes...');
114
+ let release_notes = await read_release_notes();
115
+
116
+ if (!release_notes) {
117
+ console.log('reading changelog...');
118
+ release_notes = await read_changelog(manifest.version);
119
+ }
106
120
 
107
121
  console.log('creating release...');
108
- const release_id = await create_release(repository, tag_name, commit, changelog);
122
+ const release_id = await create_release(repository, tag_name, commit, release_notes);
109
123
 
110
124
  console.log('uploading assets...');
111
125
  await upload_assets(repository, release_id, process.argv.slice(2));
@@ -116,4 +130,4 @@ async function main() {
116
130
  main().catch(e => {
117
131
  console.error('❌', e);
118
132
  process.exit(1);
119
- });
133
+ });
@@ -169,15 +169,15 @@
169
169
  }
170
170
  }
171
171
  },
172
- "8052fca741da226259577a0857de974eff37334424d24ba483890caa366a6045": {
172
+ "168799fb36a5c07de842b73d47e38fc33983aadeec36fca33b73cdc9388dce6a": {
173
173
  "source": {
174
- "path": "asset.8052fca741da226259577a0857de974eff37334424d24ba483890caa366a6045",
174
+ "path": "asset.168799fb36a5c07de842b73d47e38fc33983aadeec36fca33b73cdc9388dce6a",
175
175
  "packaging": "zip"
176
176
  },
177
177
  "destinations": {
178
178
  "712950704752-us-east-1": {
179
179
  "bucketName": "cdk-hnb659fds-assets-712950704752-us-east-1",
180
- "objectKey": "8052fca741da226259577a0857de974eff37334424d24ba483890caa366a6045.zip",
180
+ "objectKey": "168799fb36a5c07de842b73d47e38fc33983aadeec36fca33b73cdc9388dce6a.zip",
181
181
  "region": "us-east-1",
182
182
  "assumeRoleArn": "arn:${AWS::Partition}:iam::712950704752:role/cdk-hnb659fds-file-publishing-role-712950704752-us-east-1"
183
183
  }
@@ -239,7 +239,7 @@
239
239
  }
240
240
  }
241
241
  },
242
- "f66767afa98c8723a9f64656b00f3b6c59770ff1999f80e25a13159003f395c3": {
242
+ "963782dbcc82096cf569790f268319e57833403ad1f4e66535474cd45954329e": {
243
243
  "source": {
244
244
  "path": "delivlib-test.template.json",
245
245
  "packaging": "file"
@@ -247,7 +247,7 @@
247
247
  "destinations": {
248
248
  "712950704752-us-east-1": {
249
249
  "bucketName": "cdk-hnb659fds-assets-712950704752-us-east-1",
250
- "objectKey": "f66767afa98c8723a9f64656b00f3b6c59770ff1999f80e25a13159003f395c3.json",
250
+ "objectKey": "963782dbcc82096cf569790f268319e57833403ad1f4e66535474cd45954329e.json",
251
251
  "region": "us-east-1",
252
252
  "assumeRoleArn": "arn:${AWS::Partition}:iam::712950704752:role/cdk-hnb659fds-file-publishing-role-712950704752-us-east-1"
253
253
  }
@@ -5207,7 +5207,7 @@
5207
5207
  {
5208
5208
  "Name": "SCRIPT_S3_KEY",
5209
5209
  "Type": "PLAINTEXT",
5210
- "Value": "8052fca741da226259577a0857de974eff37334424d24ba483890caa366a6045.zip"
5210
+ "Value": "168799fb36a5c07de842b73d47e38fc33983aadeec36fca33b73cdc9388dce6a.zip"
5211
5211
  },
5212
5212
  {
5213
5213
  "Name": "BUILD_MANIFEST",
@@ -5219,6 +5219,11 @@
5219
5219
  "Type": "PLAINTEXT",
5220
5220
  "Value": "./CHANGELOG.md"
5221
5221
  },
5222
+ {
5223
+ "Name": "RELEASE_NOTES",
5224
+ "Type": "PLAINTEXT",
5225
+ "Value": "./RELEASE_NOTES.md"
5226
+ },
5222
5227
  {
5223
5228
  "Name": "SIGNING_KEY_ARN",
5224
5229
  "Type": "PLAINTEXT",