Skip to content

Commit

Permalink
snap_release.fsx: allow version override
Browse files Browse the repository at this point in the history
Co-authored-by: Afshin Arani <[email protected]>
  • Loading branch information
Mersho and aarani committed Nov 14, 2023
1 parent 05ea761 commit d17f7b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ jobs:
- name: Upload snap package to Snap Store
env:
SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
OVERRIDE_SNAP_VERSION: 0.7.2.1
run: |
sudo apt update
./scripts/snap_release.sh beta
10 changes: 10 additions & 0 deletions scripts/snap_release.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,16 @@ let snapPush =
| _ ->
failwith "Invalid arguments"

let overrideVersion = Environment.GetEnvironmentVariable "OVERRIDE_SNAP_VERSION"
if not (String.IsNullOrWhiteSpace overrideVersion) then
Process.Execute(
{
Command = "snapcraftctl"
Arguments = sprintf "set-version %s" overrideVersion
}, Echo.All
)
|> ignore

Process.Execute(
{
Command = "snapcraft"
Expand Down

0 comments on commit d17f7b6

Please sign in to comment.