jhuckaby / Cronicle

A simple, distributed task scheduler and runner with a web based UI.
http://cronicle.net
Other
3.93k stars 391 forks source link

Install lastest stable version #795

Closed arcanisgk closed 3 months ago

arcanisgk commented 3 months ago

https://github.com/jhuckaby/Cronicle/blob/master/docs/Setup.md

I have seen this configuration guide and it seems to me that I have to replace the version:

Replace v1.0.0 with the desired Cronicle version from the release list, or master for the head revision (unstable).

It doesn't seem entirely intuitive to me... since I would have to keep an eye on the latest release...

Wouldn't it be more convenient to bring all releases to a distribution branch called lastes?

#!/bin/bash

# Fetch the latest release version from GitHub API
LATEST_VERSION=$(curl -s https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | jq -r .tag_name)

# Replace with latest version or fallback to master if no version is found
VERSION=${LATEST_VERSION:-"master"}

# Create the directory, download, and install
mkdir -p /opt/cronicle
cd /opt/cronicle
curl -L https://github.com/jhuckaby/Cronicle/archive/${VERSION}.tar.gz | tar zxvf - --strip-components 1
npm install
node bin/build.js dist

or:

mkdir -p /opt/cronicle
cd /opt/cronicle

# Fetch the latest stable release version from the GitHub API
LATEST_VERSION=$(curl -s https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep -Po '"tag_name": "\K.*?(?=")')

# Download and extract the latest version
curl -L https://github.com/jhuckaby/Cronicle/archive/${LATEST_VERSION}.tar.gz | tar zxvf - --strip-components 1

npm install
node bin/build.js dist
jhuckaby commented 3 months ago

Err... forgive me if I am misunderstanding the problem, but, that's what the auto-installer script does. It takes care of grabbing the latest stable release for you. Those are the recommended instructions for most users, and posted above the manual install instructions:

Image

For people who don't want to use the auto-install script for whatever reason, manual instructions are also provided. Those are the ones you are reading.