Skip to content

Commit 59a9b33

Browse files
committed
chore: add pre-release script
1 parent 5734345 commit 59a9b33

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/scripts/release_patch_package_json.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ const betaPackages = [];
5858
let version = originalVersion;
5959
// If the package is an alpha or beta package, update the version number to include a suffix
6060
if (alphaPackages.includes(name)) {
61-
version = `${version}-alpha`;
61+
const iteration = JSON.parse(
62+
readFileSync(resolve('..', '..', 'v2.json'), 'utf8')
63+
).iteration;
64+
version = `${version}-alpha.${iteration}`;
6265
} else if (betaPackages.includes(name)) {
6366
version = `${version}-beta`;
6467
}
@@ -81,6 +84,10 @@ const betaPackages = [];
8184
types,
8285
files,
8386
type,
87+
scripts: {
88+
postinstall:
89+
'console.warn("This is a pre-release version of Powertools for AWS (TypeScript) provided for evaluation only. Do not use in production.")',
90+
},
8491
};
8592

8693
// Not all utilities have these fields, so only add them if they exist to avoid

0 commit comments

Comments
 (0)