mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(devtools): update DevTools release script to resolve origin URL (#64062)
`git config` only lists the configured value, but `git remote get-url` actually resolves the URL and is more stable.
I had a local configuration which aliased `gh:` to the appropriate GitHub URL:
```
[url "git@github.com:"]
insteadOf = "gh:"
pushInsteadOf = "git@github.com"
```
In this scenario, `git config` returns `gh:dgp1130/angular`, but `git remote get-url` returns `git@github.com:dgp1130/angular`, which is what the subsequent regex expects.
PR Close #64062
This commit is contained in:
@@ -298,7 +298,7 @@ async function prepareReleasePullRequest(newVersion: string): Promise<void> {
|
||||
await exec(`git push origin ${releaseBranch} --force-with-lease`);
|
||||
console.log(chalk.green('Release branch pushed to your fork.'));
|
||||
|
||||
const {stdout: remoteUrl} = await exec('git config --get remote.origin.url');
|
||||
const {stdout: remoteUrl} = await exec('git remote get-url origin');
|
||||
const match = remoteUrl.trim().match(/github\.com[/:]([\w-]+)\/angular/);
|
||||
const origin = match ? match[1] : 'angular';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user