From 5b3556e554a4f489d301ff067037e01c544f9722 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Thu, 14 Dec 2023 13:36:18 +0100 Subject: [PATCH] Update UpdatePluto.yml: allow setting version number instead of SHA --- .github/workflows/UpdatePluto.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/UpdatePluto.yml b/.github/workflows/UpdatePluto.yml index 94a1da8..2dfcd23 100644 --- a/.github/workflows/UpdatePluto.yml +++ b/.github/workflows/UpdatePluto.yml @@ -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 @@ -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() '