superfile icon indicating copy to clipboard operation
superfile copied to clipboard

Fetch latest version automatically in install script

Open lazysegtree opened this issue 7 months ago • 3 comments

The part you want to Enhancement Our current install script (website/public/install.sh) and (website/public/install.ps1) have latest versions hardcoded. On each release, we have to update these files.

Why it is necessary to enhancement Reduce manual work and chance of error on each release.

One method for mac and linux

➜  ~/Workspace/kuknitin/superfile git:(develop) ✗ [5:01:35] curl "https://api.github.com/repos/yorukot/superfile/releases/latest" 2>/dev/null | grep tag_name | cut -d\" -f4
v1.3.0
➜  ~/Workspace/kuknitin/superfile git:(develop) ✗ [5:01:37]

or 

➜  ~/Workspace/kuknitin/superfile git:(develop) ✗ [5:01:37] curl "https://api.github.com/repos/yorukot/superfile/releases/latest" 2>/dev/null | jq -r .tag_name
v1.3.0
➜  ~/Workspace/kuknitin/superfile git:(develop) ✗ [5:02:05]

For windows, we may find some alternatives

cc : @nonepork

lazysegtree avatar May 25 '25 11:05 lazysegtree

Is jq built in for linux?

nonepork avatar May 25 '25 14:05 nonepork

Its not :(

Most likely we have to use grep and cut approach.

lazysegtree avatar May 25 '25 15:05 lazysegtree

Powershell script:

Invoke-RestMethod "https://api.github.com/repos/yorukot/superfile/releases/latest" | Select-Object -ExpandProperty tag_name

JassonCordones avatar May 25 '25 20:05 JassonCordones