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

Version check: check against latest version on github #31

Merged
merged 2 commits into from
Oct 23, 2014
Merged

Version check: check against latest version on github #31

merged 2 commits into from
Oct 23, 2014

Conversation

nodiscc
Copy link
Member

@nodiscc nodiscc commented Oct 21, 2014

Fixes #5

It replaces the check to http://sebsauvage.net/files/shaarli_version.txt with https://github.com/shaarli/Shaarli/master/shaarli_version.txt (file in the shaarli/Shaarli repository, has to be updated on every new release)

 * release process: please update this file when releasing a new version on github
@nodiscc
Copy link
Member Author

nodiscc commented Oct 22, 2014

@e2jk @Sbgodin @Alkarex @BoboTiG @timovn ok to merge this?

@e2jk
Copy link

e2jk commented Oct 22, 2014

The last released version is 0.0.42 beta, whereas the version indicated in the shaarli_version.txt file is still 41.
I am not strictly opposed to this technique, but find it redundant to have to keep the version number in a separate file, while we have both the releases or tags.

Look at this example, the link
https://github.com/reactiveui/ReactiveUI/releases/latest
redirects to
https://github.com/reactiveui/ReactiveUI/releases/tag/6.1.0

If we used the Latest Release functionality (not sure why it's now working for us yet, maybe we need to make a formal release object?) we could use the value it's redirected to to determine the latest version number, and that way not need to update the text file.

But I guess that could be done as an improvement later on, so I'm OK with this merge for now.

@Alkarex
Copy link

Alkarex commented Oct 22, 2014

I think it is fine. I agree with @e2jk that it would be nice to avoid redundant information, but I do not think the current method based on file_get_contents() would be able to provide the details about the HTTP redirection. So same conclusion for me: OK for merge now, and consider improvements later.

@nodiscc
Copy link
Member Author

nodiscc commented Oct 23, 2014

OK for merge now, and consider improvements later

Checking against a simple text file is also a lot easier (one-liner), and more portable (if people want to maintain their own deployments, no need to setup RSS feeds, redirections, no dependency against github, also easier to maintain the watchfile for debian packaging)

nodiscc added a commit that referenced this pull request Oct 23, 2014
Version check: check against latest version on github
@nodiscc nodiscc merged commit 57dbbe5 into shaarli:master Oct 23, 2014
@e2jk
Copy link

e2jk commented Oct 23, 2014

I agree with the fact that the file is easier, except for the last
sentence: the Debian package looks at the tags on github ;)

+Emilien

@nodiscc
Copy link
Member Author

nodiscc commented Oct 23, 2014

the Debian package looks at the tags on github

This is not what I see in the watchfile in ftp://ftp.fr.debian.org/debian/pool/main/s/shaarli/shaarli_0.0.41~beta~dfsg2-5.debian.tar.xz

debian/watch:

version=3

opts=dversionmangle=s/~beta~dfsg\d+$/beta/ \
  http://sebsauvage.net/wiki/doku.php?id=php:shaarli http://sebsauvage.net/files/shaarli_(.*)\.zip

@e2jk
Copy link

e2jk commented Oct 23, 2014

Indeed, and that's the reason why the watchfile is currently not working ;)
See https://qa.debian.org/developer.php?login=emilien%2bdebian@klein.st,
you'll notice that the "watch" column for shaarli doesn't mention any
version.
that's because Seb removed the link to the versioned zip file from his wiki
page, instead just linking to the last commit in the repo:
https://github.com/sebsauvage/Shaarli/archive/master.zip

I have made the change to point to the Shaarli organization in this commit,
transitioning to the Github tags, the usual way to look at new versions for
packages using tags at Github:
http://anonscm.debian.org/cgit/collab-maint/shaarli.git/commit/debian/watch?id=bf14ada10e717eb4304e14741819bdd897a4da7f

For some reason I realise I haven't uploaded the newest version (0.0.42
from the Shaarli organization) yet. I made the changes 3 months ago, but I
now have to go back and see if there were any other changes i wanted to
make (need to take care of that before the Freeze at 23:59 UTC on the 5th
of November 2014)

@nodiscc nodiscc deleted the version-check branch November 4, 2014 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Github's tagged versions to detect if new version is available
3 participants