Skip to content

Commit 9f0c75a

Browse files
authored
feat: publish the Java GUI as a independent jar asset (#2000)
1 parent 7bc3c74 commit 9f0c75a

File tree

4 files changed

+39
-4
lines changed

4 files changed

+39
-4
lines changed

.github/workflows/package_installers.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
--app-image "${{ env.MACOS_TARGET_PATH }}" \
141141
--dest ${{ env.MACOS_TARGET_DEST_PATH }}
142142
143-
- name: Package cli app jar with Gradle
143+
- name: Package cli and gui app jars with Gradle
144144
if: ${{ matrix.os == 'ubuntu-latest' }}
145145
uses: gradle/actions/setup-gradle@v3
146146
with:
@@ -153,6 +153,13 @@ jobs:
153153
name: "gtfs-validator-cli-${{ env.SHORT_SHA }}.zip"
154154
path: cli/build/libs/gtfs-validator-*-cli.jar
155155

156+
- name: Persist gui app jar
157+
if: ${{ matrix.os == 'ubuntu-latest' }}
158+
uses: actions/upload-artifact@v4
159+
with:
160+
name: "gtfs-validator-gui-${{ env.SHORT_SHA }}.zip"
161+
path: app/gui/build/libs/gui-*-all.jar
162+
156163
- name: "Upload Installer"
157164
uses: actions/upload-artifact@v4
158165
with:

.github/workflows/publish_assets.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
if: github.event_name == 'release'
3636
run: ./gradlew shadowJar
3737

38-
- name: Upload JAR Asset
38+
- name: Upload CLI JAR Asset
3939
if: github.event_name == 'release'
4040
uses: actions/upload-release-asset@v1
4141
env:
@@ -46,6 +46,17 @@ jobs:
4646
asset_name: gtfs-validator-${{ steps.get_version.outputs.version-without-v }}-cli.jar
4747
asset_content_type: application/java-archive
4848

49+
- name: Upload GUI JAR Asset
50+
if: github.event_name == 'release'
51+
uses: actions/upload-release-asset@v1
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
with:
55+
upload_url: ${{ github.event.release.upload_url }}
56+
asset_path: ./app/gui/build/libs/gui-${{ steps.get_version.outputs.version-without-v }}-all.jar
57+
asset_name: gtfs-validator-${{ steps.get_version.outputs.version-without-v }}-gui.jar
58+
asset_content_type: application/java-archive
59+
4960
- name: Generate rules.json
5061
if: github.event_name == 'release'
5162
run: ./gradlew webClientRulesJSON

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,24 @@ Before running validation, tap the `Advanced` button to configure other aspects
8484
* Number of threads used to run the validator.
8585
* The country code used for phone number validation.
8686

87+
### Using GUI by command line
88+
#### Setup
89+
1. Install Java 17 or higher. To check which version of Java is installed on your computer, type the following command in the terminal: `java --version`. You can download Java from one of the following sources:
90+
- **[Eclipse Adoptium (Temurin)](https://adoptium.net/temurin/releases/)** – Open-source & widely used
91+
- **[Amazon Corretto](https://aws.amazon.com/corretto/)** - AWS-supported, optimized for cloud
92+
- **[Azul Zulu](https://www.azul.com/downloads/)** - Enterprise ready
93+
- **[Microsoft Build of OpenJDK](https://learn.microsoft.com/en-us/java/openjdk/download/)** - Microsoft's JDK
94+
- **[Oracle JDK](https://www.oracle.com/java/technologies/javase-downloads.html)** - Official Java from Oracle
95+
2. Navigate to the [Releases page](https://github.com/MobilityData/gtfs-validator/releases) and download the latest `Gtfs Validator` GUI jar (not OS-specific). It is located in the **Assets** section of the release, and it looks like `gtfs-validator-vX.X.X-gui.jar`
96+
3. Open the terminal on your computer
97+
4. Navigate to the directory containing the jar file. You can do this by typing the following command in the terminal:`cd {directory path}`, where {directory path} is the absolute or relative path to the directory. You can then make sure you're in the right directory by typing `pwd` in the terminal (this stands for *present working directory*). You can also make sure the jar file is there by typing `ls` in the terminal (this stands for *list* and will display the list of files in this directory). More about commands to navigate file and directories [here](https://help.ubuntu.com/community/UsingTheTerminal#File_.26_Directory_Commands).
98+
99+
#### Run it
100+
You can run this validator using a GTFS dataset on your computer, or from a URL.
101+
- To validate a GTFS dataset on your computer, run the following command in the terminal, replacing the text in brackets:
102+
- `java -jar {name of the jar file}`
103+
- here is an example of what the command could look like: `java -jar gtfs-validator-gui.jar`
104+
87105
# Using the command line
88106
### Setup
89107
1. Install Java 17 or higher. To check which version of Java is installed on your computer, type the following command in the terminal: `java --version`. You can download Java from one of the following sources:
@@ -92,7 +110,7 @@ Before running validation, tap the `Advanced` button to configure other aspects
92110
- **[Azul Zulu](https://www.azul.com/downloads/)** - Enterprise ready
93111
- **[Microsoft Build of OpenJDK](https://learn.microsoft.com/en-us/java/openjdk/download/)** - Microsoft's JDK
94112
- **[Oracle JDK](https://www.oracle.com/java/technologies/javase-downloads.html)** - Official Java from Oracle
95-
2. Navigate to the [Releases page](https://github.com/MobilityData/gtfs-validator/releases) and download the latest `Gtfs Validator` CLI jar (not OS-specific). It is located in the **Assets** section of the release, and it looks like `gtfs-validator-vX.X.X_cli.jar`
113+
2. Navigate to the [Releases page](https://github.com/MobilityData/gtfs-validator/releases) and download the latest `Gtfs Validator` CLI jar (not OS-specific). It is located in the **Assets** section of the release, and it looks like `gtfs-validator-vX.X.X-cli.jar`
96114
3. Open the terminal on your computer
97115
4. Navigate to the directory containing the jar file. You can do this by typing the following command in the terminal:`cd {directory path}`, where {directory path} is the absolute or relative path to the directory. You can then make sure you're in the right directory by typing `pwd` in the terminal (this stands for *present working directory*). You can also make sure the jar file is there by typing `ls` in the terminal (this stands for *list* and will display the list of files in this directory). More about commands to navigate file and directories [here](https://help.ubuntu.com/community/UsingTheTerminal#File_.26_Directory_Commands).
98116

main/src/test/java/org/mobilitydata/gtfsvalidator/validator/NoticeFieldsTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public void testNoticeClassFieldNames() {
5757
"agencyId",
5858
"agencyLang",
5959
"agencyName",
60-
"amount",
6160
"arrivalTime",
6261
"arrivalTime2",
6362
"attributionId",

0 commit comments

Comments
 (0)