Skip to content

Commit 08c3214

Browse files
committed
🐛 Fix curl -L
1 parent 113de41 commit 08c3214

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

.github/workflows/version.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
"on":
3+
schedule:
4+
# 18:00 on Friday
5+
- cron: 0 18 * * 5
6+
workflow_dispatch:
7+
8+
# https://github.com/softprops/action-gh-release/issues/236
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.GH_TOKEN }}
19+
- name: Update version
20+
run: |
21+
scripts/update-version.pl pyproject.toml
22+
- uses: stefanzweifel/git-auto-commit-action@v5

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ perl5-$(project_version)/Configure: v$(project_version).tar.gz
1717
tar xzf $<
1818

1919
v$(project_version).tar.gz:
20-
curl -O https://github.com/Perl/perl5/archive/refs/tags/$@
20+
curl -LO https://github.com/Perl/perl5/archive/refs/tags/$@

scripts/update-version.pl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env -S perl -pi
2+
BEGIN {
3+
exit if scalar @ARGV == 0;
4+
$version =
5+
`curl -s https://api.github.com/repos/Perl/perl5/releases/latest | jq -r .tag_name`;
6+
chomp $version;
7+
$version =~ s/^v//;
8+
}
9+
10+
s/(?<=version = ")[^"]+/$version/;

0 commit comments

Comments
 (0)