Skip to content

Commit

Permalink
(maint) Fix URL scripts for ssh GH URL
Browse files Browse the repository at this point in the history
When the repository remotes have been configured to use an SSH
URL, the helper scripts to update the icon URL and the package source url
incorrectly uses the wrong information when creating these.

This commit updates teh handling of these to correctly use the expected
information.
  • Loading branch information
AdmiringWorm committed Jan 18, 2024
1 parent 463dc29 commit 8cc2f69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/Update-IconUrl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ if (!$GithubRepository) {
if ($remoteName) { $remoteUrl = . git remote get-url $remoteName }

if ($remoteUrl) {
$GithubRepository = ($remoteUrl -split '\/' | select -last 2) -replace '\.git$','' -join '/'
$GithubRepository = ($remoteUrl -split '[\/:]' | select -last 2) -replace '\.git$','' -join '/'
} else {
$GithubRepository = "USERNAME/REPOSITORY-NAME"
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/Update-PackageSourceUrl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if (!$GithubRepository) {
if ($remoteName) { $remoteUrl = . git remote get-url $remoteName }

if ($remoteUrl) {
$GithubRepository = ($remoteUrl -split '\/' | select -last 2) -replace '\.git$','' -join '/'
$GithubRepository = ($remoteUrl -split '[\/:]' | select -last 2) -replace '\.git$','' -join '/'
} else {
Write-Warning "Unable to get repository and user, setting dummy values..."
$GithubRepository = "USERNAME/REPOSITORY-NAME"
Expand Down

0 comments on commit 8cc2f69

Please sign in to comment.