RolandTi / shaarli-stack

Shaarli Stack is a theme for Shaarli, the personal, minimalist, bookmarking service
https://liens.rolandtisserand.fr
BSD 3-Clause "New" or "Revised" License
22 stars 5 forks source link

Keep git tag/release and .zip file name predictable #2

Closed nodiscc closed 11 months ago

nodiscc commented 11 months ago

Hi,

I would advise keeping release names and .zip file names predictable/in sync.

I wrote this ansible role to deploy/configure/upgrade Shaarli and have been using it for years. I recently added stack to the automatic deployment procedure, since I find it so nice. To keep it up-to-date, I've subscribed to releases in this repository via RSS feeds, and just bump the shaarli_stack_version variable whenever there is a new release.

This used to work well for v0.2 and v0.3 since the release number and .zip file name can easily be constructed from the variable:

This matches the URL template defined here: url: "https://github.com/RolandTi/shaarli-stack/releases/download/{{ shaarli_stack_version }}/stack.{{ shaarli_stack_version }}.tar.gz"

However:

So I suggest sticking to a predictable file name that matches the git tag name like Shaarli does:

I agree it may be hard to remember to stick to a particular filename format when building the release zip - in which case I'd gladly contribute a simple Makefile (or build system of your choice) which you would just have to run every time there is a new release. How do you build the release archive?

Thanks again for your work on this template.

RolandTi commented 11 months ago

Hello @nodiscc !

If I understand the next release archive version should be named stack-0.7.tar.gz, stack-0.8.tar.gz… so it's keep working with your ansible role.

I don't use any build system as I still code on the long dead Espresso app, and I won't be able to fill the technical gap with all the npm/webpack… things.

But I will be careful when I will package the next version, thanks ! :-)

nodiscc commented 11 months ago

the next release archive version should be named stack-0.7.tar.gz, stack-0.8.tar.gz

Yes that would be nice, thank you! Anything would do, as long as it is predictable/in sync with the git tag name. A few examples from my other roles:

$ git grep url:|grep version
https://github.com/go-gitea/gitea/releases/download/v{{ gitea_version }}/gitea-{{ gitea_version }}-linux-amd64
https://github.com/sorenisanerd/gotty/releases/download/v{{ gotty_version }}/gotty_v{{ gotty_version }}_linux_amd64.tar.gz
https://github.com/vector-im/element-web/releases/download/v{{ matrix_element_version }}/element-v{{ matrix_element_version }}.tar.gz
https://github.com/Awesome-Technologies/synapse-admin/releases/download/{{ matrix_synapse_admin_version }}/synapse-admin-{{ matrix_synapse_admin_version }}-dirty.tar.gz
https://download.nextcloud.com/server/releases/nextcloud-{{ nextcloud_version }}.zip
https://netix.dl.sourceforge.net/project/lam/LAM/{{ ldap_account_manager_version }}/ldap-account-manager-{{ ldap_account_manager_version }}.tar.bz2
https://github.com/rapidloop/pgmetrics/releases/download/v{{ postgresql_pgmetrics_version }}/pgmetrics_{{ postgresql_pgmetrics_version }}_linux_amd64.tar.gz
https://github.com/shaarli/Shaarli/releases/download/{{ shaarli_version }}/shaarli-{{ shaarli_version }}-full.zip

I don't use any build system as I still code on the long dead Espresso app

Just zipping a directory counts as a build system in my book ;) But yeah, if it's that simple, probably no automation is needed.

I won't be able to fill the technical gap with all the npm/webpack… things.

Sounds good to me, the less external dependencies/build steps there are, the better.

RolandTi commented 11 months ago

Good to me, thanks !