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

Introduce -version option to display version #797

Merged
6 commits merged into from
May 11, 2022

Conversation

mingjun97
Copy link
Contributor

Description

  • Generate a file that holds git hash and version at build time.
  • Add option that can help print out the version info. This could benifit manage the versioning stuffs in Issues.

Type of changes

  • Bug fix
  • New feature
  • Enhancement
  • Documentation

Checklist:

  • My code follows the style guidelines of this project
  • My pull request is unique and no other pull requests have been opened for these changes
  • I have read the Contributing note and Code of conduct
  • I am responsible for any copyright issues with my code if it occurs in the future.

@mingjun97
Copy link
Contributor Author

Well.. Test locally and it works fine. But github action reject the changes. I'll play with it to figure out a solution.

@mingjun97 mingjun97 marked this pull request as draft May 11, 2022 01:45
mingjun97 added a commit to mingjun97/Grasscutter that referenced this pull request May 11, 2022
Per the Magix request. :) Follow up works for PR Grasscutters#797.
* Move `BuildConfig.java` from `/src/generated`to `/src/main` to accomplish the building pipeline

* Add BuildConfig.java to the .gitignore
@mcxiaoke
Copy link

mcxiaoke commented May 11, 2022

also add this to server start log message better , and append to the output jar name

@mingjun97 mingjun97 marked this pull request as ready for review May 11, 2022 04:41
@@ -79,6 +80,9 @@ public static void main(String[] args) throws Exception {
case "-gachamap" -> {
Tools.createGachaMapping(Grasscutter.getConfig().DATA_FOLDER + "/gacha_mappings.js"); exitEarly = true;
}
case "-version" -> {
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need a version argument?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Magix mentioned we probably want to ask user put the version inside the issue. A version argument should be relatively easy for users to retrieve the version information.

Copy link
Member

Choose a reason for hiding this comment

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

I feel like the version should be printed/logged on start up instead. If it already is, then I think this is unneeded redundancy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also implemented printed the version out at this commit. 5e74897

I can remove the -version argument if you like. I still think it's useful in some cases though.

src/main/resources/languages/en-US.json Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
@lilmayofuksu lilmayofuksu added the feature A game-related addition label May 11, 2022
@ghost ghost merged commit f16edfd into Grasscutters:development May 11, 2022
@mingjun97 mingjun97 mentioned this pull request May 15, 2022
8 tasks
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A game-related addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants