Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Release): Enable command-line releases #108

Merged
merged 12 commits into from
Apr 15, 2020
Merged

Conversation

barbeau
Copy link
Member

@barbeau barbeau commented Apr 3, 2020

Summary:

Work-in-progress - please do not merge

This pull request adds the ability to do command-line releases using the shadow Gradle plugin.

Usage:

./gradlew shadowJar

...which will output a file to \cli-app\build\libs such as gtfs-validator-v1.1.0-SNAPSHOT.jar.

This file can then be run from the command-line with the normal Java conventions:

java -jar gtfs-validator-v1.1.0-SNAPSHOT.jar -u https://transitfeeds.com/p/mbta/64/latest/download -z input.zip -i input -o output

See the updated RELEASE.md file for more details.

TODO:

  • Implement basic command line release
  • Update release docs
  • Add minification - https://imperceptiblethoughts.com/shadow/configuration/minimizing/. Original release JAR was 11,090 KB, minified JAR is 6,587 KB.
  • Typo in release docs - fix order to ./
  • Change output directory? - No, just output path to compiled JAR to console when building (see comment below)
  • Change file name to remove -all? Yes
  • Fix warning added during minification - see comment below. Fixed in 506e03f.
  • Add "v" to version number to match previous releases
  • Update usage examples and release docs to printed file output, removed "-all"
  • Add SNAPSHOT instruction for generating release
  • Test again!

Closes #66, Closes #52

@barbeau
Copy link
Member Author

barbeau commented Apr 10, 2020

After adding minification, I'm getting this warning at the end of execution (although it seems like everything works):

Apr 10, 2020 6:07:53 PM com.fasterxml.jackson.databind.ext.Java7Handlers <clinit>
WARNING: Unable to load JDK7 types (java.nio.file.Path): no Java7 type support added

Seems to be related to this issue:
FasterXML/jackson-databind#2446

I've tried bumping to the latest Jackson version '2.10.3' in the exporter and adapter modules but I'm still seeing it.

UPDATE

Fixed in 506e03f

@barbeau
Copy link
Member Author

barbeau commented Apr 14, 2020

Instead of moving the output location of the JAR, I'm printing the location of the JAR to the console now:
image

@barbeau barbeau marked this pull request as ready for review April 15, 2020 20:40
@barbeau barbeau requested a review from a user April 15, 2020 20:40
@barbeau
Copy link
Member Author

barbeau commented Apr 15, 2020

@Fabrice-V Ok, this should be ready for your review! Please try to run on your machine to make sure this works cross-platform (I've tested on Windows 10).

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good here as well, LGTM!

@barbeau barbeau merged commit 7e0fce2 into master Apr 15, 2020
@barbeau barbeau deleted the command-line-release branch April 15, 2020 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant