Skip to content

Commit d2810ef

Browse files
authored
Merge pull request #2 from LKedward/update-binary-naming
Update: for new binary naming convention
2 parents 2991700 + a7e4b5d commit d2810ef

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__GitHub Action to setup the [Fortran Package Manager](https://github.com/fortran-lang/fpm) on Ubuntu, MacOS and Windows.__
44

55
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6-
[![Github actions](https://github.com/LKedward/setup-fpm/workflows/.github/workflows/test-workflow.yml/badge.svg?event=push)](https://github.com/LKedward/setup-fpm/actions)
6+
[![Github actions](https://github.com/fortran-lang/setup-fpm/workflows/.github/workflows/test-workflow.yml/badge.svg?event=push)](https://github.com/fortran-lang/setup-fpm/actions)
77

88

99
## Usage

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ inputs:
88
description: 'API token needed to fetch latest fpm version'
99
required: false
1010
default: 'none'
11-
use-bootstrap:
12-
description: 'Whether to use the bootstrap implementation of fpm'
11+
use-haskell:
12+
description: 'Whether to use the legacy Haskell implementation of fpm'
1313
required: false
1414
default: false
1515
fpm-version:

index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ async function main(){
1414
// Get inputs
1515
const token = core.getInput('github-token');
1616

17-
const useBootstrap = core.getInput('use-bootstrap').toLowerCase() === 'true';
18-
console.log(`use-boostrap: ${useBootstrap}`);
17+
const useHaskell = core.getInput('use-haskell').toLowerCase() === 'true';
18+
console.log(`use-haskell: ${useHaskell}`);
1919

2020
fpmVersion = core.getInput('fpm-version');
2121
console.log(`fpm-version: ${fpmVersion}`);
@@ -44,7 +44,7 @@ async function main(){
4444

4545
// Build download path
4646
const fetchPath = fpmRepo + '/releases/download/' + fpmVersion + '/';
47-
const filename = getFPMFilename(useBootstrap,fpmVersion,process.platform);
47+
const filename = getFPMFilename(useHaskell,fpmVersion,process.platform);
4848

4949
console.log(`This platform is ${process.platform}`);
5050
console.log(`Fetching fpm from ${fetchPath}${filename}`)
@@ -96,21 +96,21 @@ async function main(){
9696

9797
// Construct the filename for an fpm release
9898
//
99-
// fpm-[bootstrap-]<version>-<os>-<arch>[.exe]
99+
// fpm-[haskell-]<version>-<os>-<arch>[.exe]
100100
//
101-
// <version> is a string of form vX.Y.Z corresponding to a release of fpm
102-
// <os> is either 'linux', 'darwin', or 'win32' (as returned by process.platform)
101+
// <version> is a string of form X.Y.Z corresponding to a release of fpm
102+
// <os> is either 'linux', 'macos', or 'windows'
103103
// <arch> here is always 'x86_64'
104104
//
105-
function getFPMFilename(useBootstrap,fpmVersion,platform){
105+
function getFPMFilename(useHaskell,fpmVersion,platform){
106106

107107
filename = 'fpm-';
108108

109-
if (useBootstrap) {
110-
filename += 'bootstrap-';
109+
if (useHaskell) {
110+
filename += 'haskell-';
111111
}
112112

113-
filename += fpmVersion + '-';
113+
filename += fpmVersion.replace('v','') + '-';
114114

115115
if (platform === 'linux') {
116116

0 commit comments

Comments
 (0)