Skip to content

Commit

Permalink
accept URLs with long Git tag refs
Browse files Browse the repository at this point in the history
The need to reference Git tags with `refs/tags/` prefix is caused by
changes in how Nix `2.4` and newer versions handle Git tags. They expect
tags without full name to be branches, which fails with:
```
fatal: couldn't find remote ref refs/heads/v2.0.3-status-v6
error: program 'git' failed with exit code 128
```

Issue: status-im/status-mobile#12832
PR: status-im/status-mobile#12980

Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Jan 10, 2022
1 parent ff8babc commit 1f23463
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dependency-check-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async function checkDependenciesAsync(
}

// tslint:disable-next-line:max-line-length
const urlRegex = /^(http:\/\/|https:\/\/|git\+http:\/\/|git\+https:\/\/|ssh:\/\/|git\+ssh:\/\/|github:)([a-zA-Z0-9_\-./]+)(#(.*))?$/gm
const urlRegex = /^(http:\/\/|https:\/\/|git\+http:\/\/|git\+https:\/\/|ssh:\/\/|git\+ssh:\/\/|github:)([a-zA-Z0-9_\-./]+)(#(refs\/tags)?(.*))?$/gm
const requiredProtocol = 'git+https://'

result.checkedDependencyCount += dependencies.length
Expand Down

0 comments on commit 1f23463

Please sign in to comment.