Verify deployed release commit
This commit is contained in:
@@ -3,15 +3,17 @@ import { mkdirSync, writeFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const qaVersion = process.env.PUBLIC_QA_VERSION ?? makeQaVersion();
|
||||
const releaseCommit = gitValue(['rev-parse', 'HEAD'], 'unknown');
|
||||
const releaseShortCommit = gitValue(['rev-parse', '--short', 'HEAD'], 'unknown');
|
||||
|
||||
assertNoTrackedChanges();
|
||||
runPnpmScript('verify:local-release');
|
||||
runPnpmScript('qa:early');
|
||||
writeReleaseManifest(qaVersion);
|
||||
writeReleaseManifest(qaVersion, releaseCommit, releaseShortCommit);
|
||||
runPnpmScript('deploy:nas:dist');
|
||||
runPnpmScript('verify:public-deploy', { PUBLIC_QA_VERSION: qaVersion });
|
||||
runPnpmScript('verify:public-deploy', { PUBLIC_QA_VERSION: qaVersion, PUBLIC_QA_COMMIT: releaseCommit });
|
||||
|
||||
console.log(`Shipped and verified public deploy with PUBLIC_QA_VERSION=${qaVersion}`);
|
||||
console.log(`Shipped and verified public deploy with PUBLIC_QA_VERSION=${qaVersion} at ${releaseShortCommit}`);
|
||||
|
||||
function makeQaVersion() {
|
||||
const stamp = new Date().toISOString().replace(/[-:.TZ]/g, '').slice(0, 14);
|
||||
@@ -33,12 +35,12 @@ function assertNoTrackedChanges() {
|
||||
}
|
||||
}
|
||||
|
||||
function writeReleaseManifest(qaVersion) {
|
||||
function writeReleaseManifest(qaVersion, commit, shortCommit) {
|
||||
const manifest = {
|
||||
app: 'heros_web',
|
||||
qaVersion,
|
||||
commit: gitValue(['rev-parse', 'HEAD'], 'unknown'),
|
||||
shortCommit: gitValue(['rev-parse', '--short', 'HEAD'], 'unknown'),
|
||||
commit,
|
||||
shortCommit,
|
||||
branch: gitValue(['branch', '--show-current'], 'unknown'),
|
||||
generatedAt: new Date().toISOString(),
|
||||
verification: ['verify:local-release', 'qa:early', 'verify:public-deploy']
|
||||
|
||||
Reference in New Issue
Block a user