aardappel / procrastitracker

a Windows time tracking application
http://strlen.com/procrastitracker/
500 stars 53 forks source link

chocolatey for your installer #2

Closed jonlt closed 6 years ago

jonlt commented 8 years ago

Great program! You should consider making it available through chocolatey.

aardappel commented 8 years ago

Would you like to contribute that? It doesn't need to be the author of the software that adds it to Chocolatey.

jonlt commented 8 years ago

Sure. I think all we need is a place to store the installer and a little bit of info for chocolatey. Seems like the installer side of things is already down. So all we need is meta for chocolatey, i can take a look at that, sure.

aardappel commented 8 years ago

Thanks! Yeah the URL where you can find the installer is meant to be stable, so feel free to link to that. I presume chocolatey caches what they get from site though?

jonlt commented 8 years ago

The package does not contain the installer, only a link to it. The client downloads the installer directly during the installation of the package. This also means that you can get in trouble if the download-link to the installer does not contain a version-identifier of some kind. (When a new version of the software is released, the old packages will link to the new version of the installer).

I have the scripts ready for your review: https://gist.github.com/jonlt/d1b088719dbdb738bbe7

The only thing missing is a link to a png icon in the .nuspec-file. I could convert your .ico, but that might not be the best option?

aardappel commented 8 years ago

I'm not sure I understand the versioning issue. What exactly will happen if I upload a newer installer that has the same name as the old one?

The scripts look good otherwise.

Here's a PNG: procrastitracker

jonlt commented 8 years ago

You have a Chocolatey package for each version of the software. Each chocolatey package contains the url for the installer. As far as i can tell, that means that if a new installer is uploaded to the same url as the previous one, the old chocolatey packages will download the new version of the installer. Or if a new version of the installer is uploaded without a new chocolatey package being released, the version number in the chocolatey package would not match the version number of the installer. I guess it is not the biggest of issues, as you would most likely want the newest one anyway.

aardappel commented 8 years ago

Yeah, sounds mostly fine to me. Maybe instead of 2.1 just put latest in the nuspec :)

rafareino commented 6 years ago

I has been abandoned?

aardappel commented 6 years ago

Dunno, @jonlt ?

jonlt commented 6 years ago

yep - abandoned. Sorry. Gist is still there if anyone wanna pick it back up though.

TheCakeIsNaOH commented 3 years ago

I have an updated chocolatey package source available here: https://github.com/TheCakeIsNaOH/chocolatey-packages/tree/master/procrastitracker

It is setup to include the installer inside the .nupkg package file, instead of downloading at runtime.

The only issue with uploading it to Chocolatey.org is the above-mentioned versioning. On Chocolatey.org, each package version is immutable, so once a version is approved it is not allowed to be changed. The only way to changing something is to upload a new version. It uses nuget .nuspec versioning, so something like latest won't work. Using a version with an ISO 8601 calendar date (YYYYMMDD) included, for example 0.0.0.20210107, would work fine.

The date used in the current version seems to only be defined in the about page, which means there is not a simple way of getting the version programmatically, so updates of the chocolatey package would perforce be completely manual. It would be nice if the version would be available in the installer version info, or perhaps in the filename.

aardappel commented 3 years ago

This program is now entirely commit-driven, so I don't expect there to be "versions" with any significance anymore, certainly I don't intend to version anything manually. So either the version should directly be the commit-id, or incrementally derived from it in some automatic way.

TheCakeIsNaOH commented 3 years ago

I don't expect there to be "versions" with any significance anymore,

I mean versions like 0.0.0.20210107 then 0.0.0.20210109 then 0.0.0.20210112, and continuing on with the date.

So either the version should directly be the commit-id, or incrementally derived from it in some automatic way.

Unfortunately, the nuget versioning system only allows numbers in the "normal" version part (a prerelease can use letters), and a random string of numbers wouldn't make each version later than the previous one, it would be random ordering.

The current way of using the date would be fine, just expressed in the YYYYMMDD format, as newer commits would be on newer days, and the date string is consistently increasing, unlike the random commit ids.

aardappel commented 3 years ago

Yup, dates is fine by me. Though 2021.01.07 would be nicer..

TheCakeIsNaOH commented 3 years ago

So currently I'm stuck on downloading from the CI, as I have discovered that artifacts from GitHub actions cannot be downloaded without logging in, or without a token if using the API.

See: https://github.com/actions/upload-artifact/issues/51

So I'll hold off on uploading until there is a publicly available official build on your site that has the updated NSIS script. Because I don't think it will go over well with the moderators if the download URL is not public.

aardappel commented 3 years ago

I replaced the installer on the site with the latest one from CI just now, so you can test it. I don't intend to do that very often, however..

TheCakeIsNaOH commented 3 years ago

Thanks, the package has been uploaded here: https://chocolatey.org/packages/procrastitracker