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

show git branch and hash in About dialog #1692

Merged
merged 3 commits into from Jun 27, 2019

Conversation

@tessus
Copy link
Collaborator

commented Jun 26, 2019

This additional info will only be shown, if the code is not an official release.

An official release is calculated as follows:

  • current commit has a tag
  • the tag contains the version number of the package

However, the information will always be printed to the console.


I found it useful in certain situations to know which branch and/or git hash was used to build Joplin. Especially, if you are testing a lot of versions and or running tests with different binaries.

It won't change anything for new releases. It will only show that info when Joplin is not an official release.

show git branch and hash in About dialog
This additional info will only be shown, if the code is not an official release.

An official release is calculated as follows:
- current commit has a tag
- the tag contains the version number of the package

However, the information will always be printed to the console.
ElectronClient/app/app.js Outdated Show resolved Hide resolved
@laurent22

This comment has been minimized.

Copy link
Owner

commented Jun 26, 2019

That looks good, I've just left 2 minor comments. Any reason why we can't have this in release too? That would give us extra info in particular if there's a build issue.

@tessus

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 26, 2019

No, no reason. I thought you might not want it for releases, because of the following:

  • the branch would always be master
  • the text master (xxxxxx) could confuse people
@laurent22

This comment has been minimized.

Copy link
Owner

commented Jun 26, 2019

  • the branch would always be master

  • the text master (xxxxxx) could confuse people

Maybe let's write it like this to make it clearer:

Revision xxxxxxx (master)

@tessus

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 26, 2019

Sure, the code would have been a lot less complex w/o the release check. :-)

Yes, I can change it to Revision xxxxxxx (master), or should there be a : after revision...
Revision: xxxxxxx (master)

Not sure what looks better.

info will now always be shown in About dialog (if available)
ElectronClient/app/compile-package-info.js: added warning
ElectronClient/app/app.js: push info conditionally to the message array

@tessus tessus changed the title show git branch and hash in About dialog (only for unofficial releases) show git branch and hash in About dialog Jun 26, 2019

@tessus

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 27, 2019

Done. Please let me know what you think.

ElectronClient/app/app.js Outdated Show resolved Hide resolved
@tessus

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 27, 2019

Changed it accordingly and tested it. Going back to bed.... Will be back in a few hours.

@laurent22

This comment has been minimized.

Copy link
Owner

commented Jun 27, 2019

Perfect, thanks for this @tessus!

@laurent22 laurent22 merged commit 207d433 into laurent22:master Jun 27, 2019

@tessus tessus deleted the tessus:about branch Jul 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.