shadowsocks-rust icon indicating copy to clipboard operation
shadowsocks-rust copied to clipboard

Suggest: Remove version number in release file name

Open kda2000 opened this issue 3 years ago • 12 comments

After ' Remove version number in file name of release binary ' , We can make easy fixed URL download and extract using keyword 'latest'.

Example: curl -OL https://github.com/shadowsocks/shadowsocks-rust/releases/latest/download/shadowsocks- (REMOVE THIS v1.12.3) .aarch64-unknown-linux-musl.tar.xz tar xf shadowsocks-aarch64-unknown-linux-musl.tar.xz

Example: curl -OL https://github.com/v2fly/v2ray-core/releases/latest/download/v2ray-linux-arm64-v8a.zip unzip v2ray-linux-arm64-v8a.zip

kda2000 avatar Nov 26 '21 16:11 kda2000

This is a very bad idea. V2Ray's release filename format is only kept like this for historical reasons.

database64128 avatar Nov 26 '21 17:11 database64128

Bad idea?It depends. Here are some well-known project not including version number in their release filename: v2fly/v2ray-core moparisthebest/static-curl atom/atom sivel/speedtest-cli

Fixed Latest URL is just an 302 redirect. It will not interrupt any downloading process by accident. It's just making life easier. People who has higher level need, can still grab latest version number in HTTP LOCATION HEADER, or Github's odd json api.

ghost avatar Nov 26 '21 17:11 ghost

Here are some well-known project not including version number in their release filename:

What about the opposite? A lot more I guess.

It's just making life easier.

No, it doesn't.

database64128 avatar Nov 26 '21 18:11 database64128

I think this is an unnecessary change, that could cause problems for some GitHub releases based automation scripts.

kallydev avatar Nov 27 '21 01:11 kallydev

This is a reasonable request. But this is also a breaking change for scripts.

For people who just want to download the latest release, currently we can do it with Github's API.

zonyitoo avatar Nov 27 '21 03:11 zonyitoo

This proposed change is unhelpful or even bad in all scenarios I can imagine:

  1. Manual one-shot download: The downloaded zip filename is always the same, and contains no version information. 👎
  2. One-shot deployment script: You shouldn't use this type of script, because you should keep up with updates. 👎
  3. Script with auto update: The script should already parse tags, and can easily support the current naming scheme. This change would break existing scripts. 👎
  4. Build from source: No impact. 😑
  5. cargo install: No impact. 😑

database64128 avatar Nov 27 '21 04:11 database64128

It's easy to get the last version tag..

LASTURL="https://github.com/shadowsocks/shadowsocks-rust/releases/latest"
LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' ${LASTURL})
LATEST_VERSION=$(echo $LATEST_RELEASE | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/; s/v//g; s/ //g')

rampageX avatar Nov 27 '21 06:11 rampageX

This proposed change is unhelpful or even bad in all scenarios I can imagine:

  1. Manual one-shot download: The downloaded zip filename is always the same, and contains no version information. 👎
  2. One-shot deployment script: You shouldn't use this type of script, because you should keep up with updates. 👎
  3. Script with auto update: The script should already parse tags, and can easily support the current naming scheme. This change would break existing scripts. 👎
  4. Build from source: No impact. 😑
  5. cargo install: No impact. 😑

It is for quick first time deployment.

  1. Apache:"It works!". Things like this can be an great congratulations for newbie. No one gets hurt. Filename is not important.
  2. People do have their right to stay old release. Look at **** windows update, iOS update.
  3. People have their right to update too. Run command again. It's gonna be all done. To save bandwidth or do things smart: Github api still work and not affected by this change.

ghost avatar Nov 27 '21 07:11 ghost

No one gets hurt. Filename is not important.

If you use Windows, take a look at your download folder. Count how many zip files and installers have version in its filename. Think about what happens if the version is striped from the filename.

People do have their right to stay old release

People have their right to update too. Run command again. It's gonna be all done.

No one is taking away anyone's rights. This makes no sense at all.

database64128 avatar Nov 27 '21 07:11 database64128

No one gets hurt. Filename is not important.

If you use Windows, take a look at your download folder. Count how many zip files and installers have version in its filename. Think about what happens if the version is striped from the filename.

People do have their right to stay old release

People have their right to update too. Run command again. It's gonna be all done.

No one is taking away anyone's rights. This makes no sense at all.

No one is taking away anyone's rights.

Come on.It's just an filename.Furthermore it can be temporary.Download, Extract and Remove.

It's just for quick installation, and no one gets hurt.

sergioedo avatar Nov 27 '21 07:11 sergioedo

Things like this can be an great congratulations for newbie. No one gets hurt.

This encourages bad and unsafe practices, making newbies hurt themselves. This project is supposed to encourage correct and safe usage.

Download, Extract and Remove.

You are assuming everyone does things like you do. I always keep at least 1 older version in my download folder.

database64128 avatar Nov 27 '21 08:11 database64128

This is a very bad idea. V2Ray's release filename format is only kept like this for historical reasons.

I think so, and actually we can easily get the latest version by shell or something, such as:

wget `curl -s https://api.github.com/repos/shadowsocks/shadowsocks-rust/releases/latest | grep -Po '(?<=download_url\"\: \").*x86.64-unknown-linux-gnu.tar.xz' | uniq`

So maybe we should close this issue for now.

fernvenue avatar Jul 02 '22 12:07 fernvenue