Skip to content

Commit

Permalink
linux doesn't allow -alpha; try _alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
artoonie committed Jun 24, 2023
1 parent 37ff825 commit 163159a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 31 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name: "Generate Releases"
on:
release:
types: [published]
# To test this workflow without creating a release, uncomment the following and add a branch name:
# push:
# branches:
# - 'branch-name'
push:
branches:
- 'allow-tags-in-linux-release'

jobs:
release:
Expand All @@ -19,7 +18,6 @@ jobs:
id: basefn
shell: bash
run: |
FILEPATH=$(echo rctab_${{ github.ref_name }}_${{ runner.os }} | sed -e 's/\//_/g')
echo "FILEPATH=$FILEPATH" >> $GITHUB_OUTPUT
# Normalize platform-specific filepaths generated by gradle
Expand All @@ -42,14 +40,13 @@ jobs:
id: jpackagefn
shell: bash
run: |
# TODO Sync version number with Main.java and build.gradle (github.com/BrightSpots/rcv/issues/662)
# The version numbers are hardcoded because the files below include the version number in them,
# and while we could use some regex to figure out the version number automatically, it seems cleaner
# to know the expected version number upfront.
if [ ${{ runner.os }} == 'Windows' ]; then
echo "FILEPATH=build/jpackage/RCTab-1.4.0-alpha.exe" >> $GITHUB_OUTPUT
elif [ ${{ runner.os }} == 'Linux' ]; then
echo "FILEPATH=build/jpackage/rctab_1.4.0-alpha-1_amd64.deb" >> $GITHUB_OUTPUT
if [ ${{ runner.os }} == 'Linux' ]; then
echo "FILEPATH=build/jpackage/rctab_1.4.0~alpha-1_amd64.deb" >> $GITHUB_OUTPUT
elif [ ${{ runner.os }} == 'Windows' ]; then
echo "FILEPATH=build/jpackage/RCTab-0.0.0.exe" >> $GITHUB_OUTPUT
else
echo "FILEPATH=build/jpackage/RCTab-1.4.0-alpha.dmg" >> $GITHUB_OUTPUT
fi
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/test.yml

This file was deleted.

11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,16 @@ jlink {
launcher {
// TODO Sync version number with release.yml and Main.java (github.com/BrightSpots/rcv/issues/662)
name = "RCTab"
version = "1.4.0-alpha"
if (org.gradle.internal.os.OperatingSystem.current().isLinux()) {
// Linux can't have -alpha or _alpha
version = "1.4.0~alpha"
} else if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
// Windows can't have any modifiers to x.y.z
version = "0.0.0"
} else {
// Mac can't have version numbers that star with 0.0.0
version = "1.4.0-alpha"
}
}

jpackage {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/network/brightspots/rcv/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class Main extends GuiApplication {

// TODO Sync version number with release.yml and build.gradle:
// github.com/BrightSpots/rcv/issues/662
public static final String APP_VERSION = "1.4.0-alpha";
public static final String APP_VERSION = "1.4.0_alpha";

/**
* Main entry point to RCTab.
Expand Down

0 comments on commit 163159a

Please sign in to comment.