Skip to content

Commit 88bcedb

Browse files
authored
Support of the release "current" (#54)
2 parents fdf027c + 17d98a8 commit 88bcedb

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.github/workflows/test-workflow.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
12-
fpm-version: ["v0.8.0", "v0.9.0", "v0.10.1", "latest"]
11+
os: [ubuntu-latest, macos-14, macos-15, windows-latest]
12+
fpm-version: ["v0.9.0", "v0.10.1", "v0.11.0", "v0.12.0", "latest", "current"]
1313
node-version: ["20.x"]
14-
exclude:
15-
# v0.8.0 install.sh is broken, can't be built from source on macOS ARM64
16-
- os: macos-14
17-
fpm-version: "v0.8.0"
1814

1915
steps:
2016
- name: Checkout

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ __`github-token`__ (*only needed if `fpm-version` is `'latest'` or not specified
2828

2929
__`fpm-version`__ (*optional, default:* see below) the tag corresponding to a Github release from which to fetch the `fpm` binary.
3030
- If set to `'latest'` then the latest `fpm` release at [fortran-lang/fpm](https://github.com/fortran-lang/fpm/releases/latest) will be substituted. `github-token` must be provided if `fpm-version` is `'latest'`.
31+
- If set to `'current'` then the current `fpm` release at [fortran-lang/fpm](https://github.com/fortran-lang/fpm/releases/current) will be substituted.
3132

3233
__`fpm-repository`__ (*optional, default:* `https://github.com/fortran-lang/fpm`) which Github fork to fetch release binaries from.
3334

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ async function main(){
153153
function getFPMFilename(fpmVersion, platform, arch, compiler = '') {
154154
var filename = 'fpm-';
155155

156-
// Remove the leading 'v' if it exists
157-
filename += fpmVersion.replace('v', '') + '-';
156+
// Remove the leading 'v' if it exists if fpmVersion is not equal to 'current'
157+
if (fpmVersion != 'current') {
158+
filename += fpmVersion.replace('v', '') + '-';
159+
}
158160

159161
// Map Node.js arch to FPM arch naming
160162
let fpmArch = 'x86_64';

0 commit comments

Comments
 (0)