build(docs-infra): print the git commit when deploying to Firebase (#39596)
The commit updates the AIO deployment script to also print the commit SHA. This makes it easier to check whether a version has been successfully deployed, by comparing the commit SHA from the CI job with the SHA in the version string in the footer of the AIO app. PR Close #39596
This commit is contained in:
parent
48d15fc760
commit
b9bf03af33
|
@ -31,6 +31,7 @@ if (require.main === module) {
|
|||
} else {
|
||||
console.log(
|
||||
`Git branch : ${inputVars.currentBranch}\n` +
|
||||
`Git commit : ${inputVars.currentCommit}\n` +
|
||||
`Build/deploy mode : ${deploymentInfo.deployEnv}\n` +
|
||||
`Firebase project : ${deploymentInfo.projectId}\n` +
|
||||
`Firebase site : ${deploymentInfo.siteId}\n` +
|
||||
|
|
|
@ -262,17 +262,19 @@ describe('deploy-to-firebase:', () => {
|
|||
});
|
||||
|
||||
it('integration - should run the main script without error', () => {
|
||||
const commit = getLatestCommit('master');
|
||||
const cmd = `"${process.execPath}" "${__dirname}/deploy-to-firebase" --dry-run`;
|
||||
const env = {
|
||||
CI_REPO_OWNER: 'angular',
|
||||
CI_REPO_NAME: 'angular',
|
||||
CI_PULL_REQUEST: 'false',
|
||||
CI_BRANCH: 'master',
|
||||
CI_COMMIT: getLatestCommit('master')
|
||||
CI_COMMIT: commit,
|
||||
};
|
||||
const result = execSync(cmd, {encoding: 'utf8', env}).trim();
|
||||
expect(result).toBe(
|
||||
'Git branch : master\n' +
|
||||
`Git commit : ${commit}\n` +
|
||||
'Build/deploy mode : next\n' +
|
||||
'Firebase project : angular-io\n' +
|
||||
'Firebase site : next-angular-io-site\n' +
|
||||
|
|
Loading…
Reference in New Issue