-
-
Notifications
You must be signed in to change notification settings - Fork 785
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
Add check version functionality #296
Conversation
Eventually, I really would like to update automagically by default. Potentially allow people to disable the update mechanism via some command line launch argument or something not in the UI. |
Reviewed but not yet tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Query and minor changes.
Since we are getting the URL anyway, is there any reason we can't or shouldn't include a direct link to the latest download in the about page? |
The API endpoint i am quering is this one tags. |
The download path should be rather straight forward: |
@ueaslsef since we are doing it we might as well go all the way .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post-test review.
I'm thinking that the latest version section should only be shown if the version tag is set. As it is, when no version is set (ie local build), it shows an empty Latest Version Build Hash and a button that does basically nothing.
* add backend support * add ui support * minor fixes * workaround query refetch not working after network error * revert changes to Makefile after testing is complete * cosmetic fixes * switch to Releases Github API endpoint, add latest Release URL to UI * cosmetic fixes * latest version is only shown in UI when version is available and data is ready * cosmetic fix * resolve conflict , squash rebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
* Add check version functionality * add backend support * add ui support * minor fixes * cosmetic fixes * workaround query refetch not working after network error * revert changes to Makefile after testing is complete * switch to Releases Github API endpoint, add latest Release URL to UI * latest version is only shown in UI when version is available and data is ready * resolve conflict , squash rebase
Adds initial support for new version checking. Mentioned also in #288
As it is now it uses the github api to get the shorthash commits from the repo tags.
It matches the current version (
v0.0.0-alpha
or 'v0.0.0-alpha_dev' ) to the respective repo tags and gets the related commit hash from there.If it's different than the local that means that a new release build is available.It first prints a message in the console when the app is started and you can see it also when you open the about tab from the settings.An extra button is also available for manual checking.
for dev testing the build , since version is added through TRAVIS you need to add it to the ldflags in the Makefile
-X 'github.com/stashapp/stash/pkg/api.version=v0.0.0-alpha_dev'
or
-X 'github.com/stashapp/stash/pkg/api.version=v0.0.0-alpha'