Skip to content

Commit

Permalink
refactor(autoUpdate): standardize version string handling by replacin…
Browse files Browse the repository at this point in the history
…g 'v' prefix

Signed-off-by: Jérémy Audiger <[email protected]>
  • Loading branch information
jaudiger committed Feb 2, 2025
1 parent d96c602 commit 1a05b5a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/amber/project.bri
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function autoUpdate() {
const src = std.file(std.indoc`
let version = http get https://api.github.com/repos/amber-lang/amber/releases/latest
| get tag_name
| str replace --regex '^v' ''
$env.project | from json | update version $version | to json
`);
Expand Down
2 changes: 1 addition & 1 deletion packages/bat/project.bri
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function autoUpdate() {
const src = std.file(std.indoc`
let version = http get https://api.github.com/repos/sharkdp/bat/releases/latest
| get tag_name
| str substring 1..
| str replace --regex '^v' ''
$env.project | from json | update version $version | to json
`);
Expand Down
2 changes: 1 addition & 1 deletion packages/broot/project.bri
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function autoUpdate() {
const src = std.file(std.indoc`
let version = http get https://api.github.com/repos/Canop/broot/releases/latest
| get tag_name
| str substring 1..
| str replace --regex '^v' ''
$env.project | from json | update version $version | to json
`);
Expand Down
3 changes: 1 addition & 2 deletions packages/github_cli/project.bri
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function autoUpdate() {
let version = $releaseData
| get tag_name
| str replace '^v' ''
| str replace --regex '^v' ''
let latestBuildDate = $releaseData
| get created_at
Expand All @@ -63,7 +63,6 @@ export function autoUpdate() {
| update version $version
| update latestBuildDate $latestBuildDate
| to json
`);

return std.withRunnable(std.directory(), {
Expand Down
1 change: 1 addition & 0 deletions packages/libpsl/project.bri
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export function autoUpdate() {
const src = std.file(std.indoc`
let version = http get https://api.github.com/repos/rockdaboot/libpsl/releases/latest
| get tag_name
| str replace --regex '^v' ''
$env.project | from json | update version $version | to json
`);
Expand Down
1 change: 1 addition & 0 deletions packages/seaweedfs/project.bri
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export async function autoUpdate() {
const src = std.file(std.indoc`
let version = http get https://api.github.com/repos/seaweedfs/seaweedfs/releases/latest
| get tag_name
| str replace --regex '^v' ''
$env.project | from json | update version $version | to json
`);
Expand Down

0 comments on commit 1a05b5a

Please sign in to comment.