Skip to content

Commit

Permalink
Update UpdatePluto.yml: allow setting version number instead of SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp authored Dec 14, 2023
1 parent f72fbbe commit 5b3556e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/UpdatePluto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
inputs:
plutocommitsha:
description: 'Commit SHA'
description: 'Commit SHA or version number'
required: true
default: '3df8390a'
default: '3df8390a or 0.19.36'

concurrency:
group: updatepluto
Expand Down Expand Up @@ -37,7 +37,12 @@ jobs:
Pkg.instantiate()
Pkg.resolve()
Pkg.rm("Pluto")
Pkg.add([Pkg.PackageSpec(name="Pluto", rev="${{ github.event.inputs.plutocommitsha }}")])
input = "${{ github.event.inputs.plutocommitsha }}"
if occursin(".", input)
Pkg.add([Pkg.PackageSpec(name="Pluto", version=parse(VersionNumber, input))])
else
Pkg.add([Pkg.PackageSpec(name="Pluto", rev=input)])
end
Pkg.update()
'
Expand Down

0 comments on commit 5b3556e

Please sign in to comment.