fix(dev-infra): search since HEAD on the local branch for version tags when creating stamps (#43065)

Using `HEAD~100` was errantly left in the snapshot stamping logic.

PR Close #43065
This commit is contained in:
Joey Perrott 2021-08-06 07:57:26 -07:00 committed by Andrew Kushnir
parent 4db80d69d7
commit d8690d867c
2 changed files with 3 additions and 3 deletions

View File

@ -7765,7 +7765,7 @@ function getSCMVersions(mode) {
const git = GitClient.get();
if (mode === 'snapshot') {
const localChanges = hasLocalChanges() ? '.with-local-changes' : '';
const { stdout: rawVersion } = git.run(['describe', '--match', '*[0-9]*.[0-9]*.[0-9]*', '--abbrev=7', '--tags', 'HEAD~100']);
const { stdout: rawVersion } = git.run(['describe', '--match', '*[0-9]*.[0-9]*.[0-9]*', '--abbrev=7', '--tags', 'HEAD']);
const { version } = new semver.SemVer(rawVersion);
const { version: experimentalVersion } = createExperimentalSemver(version);
return {

View File

@ -56,8 +56,8 @@ function getSCMVersions(mode: EnvStampMode): {version: string, experimentalVersi
const git = GitClient.get();
if (mode === 'snapshot') {
const localChanges = hasLocalChanges() ? '.with-local-changes' : '';
const {stdout: rawVersion} = git.run(
['describe', '--match', '*[0-9]*.[0-9]*.[0-9]*', '--abbrev=7', '--tags', 'HEAD~100']);
const {stdout: rawVersion} =
git.run(['describe', '--match', '*[0-9]*.[0-9]*.[0-9]*', '--abbrev=7', '--tags', 'HEAD']);
const {version} = new SemVer(rawVersion);
const {version: experimentalVersion} = createExperimentalSemver(version);
return {