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:
parent
4db80d69d7
commit
d8690d867c
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue