Fetch latest version automatically in install script
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
Is jq built in for linux?
Its not :(
Most likely we have to use grep and cut approach.
Powershell script:
Invoke-RestMethod "https://api.github.com/repos/yorukot/superfile/releases/latest" | Select-Object -ExpandProperty tag_name