Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions compiler/scripts/release/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,20 @@ async function main() {
);
const dateString = await getDateStringForCommit(commit);
const otp = argv.ci === false ? await promptForOTP() : null;
const {hash} = await hashElement(path.resolve(__dirname, '../..'), {
encoding: 'hex',
folders: {exclude: ['node_modules']},
files: {exclude: ['.DS_Store']},
});
const truncatedHash = hash.slice(0, 7);
const newVersion = `0.0.0-experimental-${truncatedHash}-${dateString}`;

for (const pkgName of pkgNames) {
const pkgDir = path.resolve(__dirname, `../../packages/${pkgName}`);
const pkgJsonPath = path.resolve(
__dirname,
`../../packages/${pkgName}/package.json`
);
const {hash} = await hashElement(pkgDir, {
encoding: 'hex',
folders: {exclude: ['node_modules']},
files: {exclude: ['.DS_Store']},
});
const truncatedHash = hash.slice(0, 7);
const newVersion = `0.0.0-experimental-${truncatedHash}-${dateString}`;

spinner.start(`Writing package.json for ${pkgName}@${newVersion}`);
await writeJson(
Expand Down