-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Release): Enable command-line releases (#108)
* Update release docs * Add minification * Print the path to the command-line app JAR
- Loading branch information
Showing
4 changed files
with
65 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
# Release instructions | ||
|
||
To create a release jar file, we use the IntelliJ artifact build feature | ||
We create releases from the command-line using the [shadow Gradle plugin](https://github.com/johnrengelman/shadow), which creates a JAR file including all necessary dependencies. | ||
|
||
- Go to File->Project Structure | ||
- Select Artifacts in the left pane | ||
- Add a new one by clicking the '+' button | ||
- of type JAR->From modules with dependencies | ||
- Select the Main class from cli-app module | ||
- Place the META-INF file at the project's root | ||
- In the output Layout, add both cli-app and in-memory-simple modules main resource directory content | ||
### 1. Prepare for release | ||
Change `version` in the various `build.gradle` files to remove the `-SNAPSHOT` qualifier. | ||
|
||
For example, if the current version is `1.1.0-SNAPSHOT`, change the `version` to `1.1.0`. | ||
|
||
### 2. Do the release | ||
|
||
``` | ||
./gradlew shadowJar | ||
``` | ||
|
||
The command line output will tell you where the compiled JAR file is located - for example: | ||
|
||
>Successfully built the gtfs-validator command-line app: C:\git-projects\gtfs-validator\application\cli-app\build\libs\gtfs-validator-v1.1.0.jar | ||
This file can then be run from the command-line with the normal Java conventions: | ||
|
||
``` | ||
java -jar gtfs-validator-v1.1.0.jar -u https://transitfeeds.com/p/mbta/64/latest/download -z input.zip -i input -o output | ||
``` | ||
|
||
### 3. Prepare for the next development cycle | ||
|
||
Increment the `version` in the various `build.gradle` files and add the `-SNAPSHOT` qualifier. | ||
|
||
For example, if the version you just released is `1.1.0`, change the `version` to `1.1.1-SNAPSHOT`. | ||
|
||
For more details on versioning, see [Understanding Maven Version Numbers](https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN8855). | ||
|
||
- Build the jar through Build->Build Artifacts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters