We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd like to modifiy the install script to add a version parameter, and print hint about operating systems.
For example, we can check version from Environment or args by:
#--------------------------------------------------------------# # Version #--------------------------------------------------------------# DEFAULT_VERSION=v2.6.0 VALID_VERSIONS="\ v1.0.0 v1.1.1 v1.2.0 v1.3.0 v1.4.0 v1.4.1 v1.5.0 v1.5.1 v2.0.0 \ v2.0.1 v2.0.2 v2.1.0 v2.2.0 v2.3.0 v2.3.1 v2.4.0 v2.4.1 v2.5.0 v2.5.1 v2.6.0" VERSION=${DEFAULT_VERSION} VERSION_FROM="default" KERNEL=$(uname) ARCH=$(uname -m) # arg1 > env > default if [[ -n "$1" ]]; then VERSION=$1 VERSION_FROM="arg" fi function check_version(){ local found=false # validate version format if [[ ! ${VERSION} =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+[0-9]+)?$ ]]; then log_error "invalid version string from ${VERSION_FROM}: ${VERSION}" exit 1 fi # check version in table for ver in ${VALID_VERSIONS}; do if [ "${ver}" = "${VERSION}" ]; then found="true" break fi done # print version string if valid if [[ "${found}" != "true" ]]; then log_error "invalid version from ${VERSION_FROM}: ${VERSION}" log_hint "valid pigsty versions:" for ver in ${VALID_VERSIONS}; do log_hint " - ${ver}" done exit 1 fi } check_version
The text was updated successfully, but these errors were encountered:
Resolve by 00e7f0c
Now you can download pigsty with:
bash -c "$(curl -fsSL https://get.pigsty.cc/i)" bash -c "$(curl -fsSL https://get.pigsty.cc/install)" bash -c "$(curl -fsSL https://get.pigsty.cc/latest)" # To install a specific version of pigsty (e.g. v2.6.0) bash -c "$(curl -fsSL https://get.pigsty.cc/i)" -- v2.6.0 curl -fsSL https://get.pigsty.cc/i | bash -s v2.6.0
Sorry, something went wrong.
Vonng
No branches or pull requests
I'd like to modifiy the install script to add a version parameter, and print hint about operating systems.
For example, we can check version from Environment or args by:
The text was updated successfully, but these errors were encountered: