-
-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
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
Support pinning version during binary install #1237
Support pinning version during binary install #1237
Conversation
Hello @glemsom, thanks for your contribution. Please check the annotations from Codacy regarding double quotes and we should be good to go. |
As per Maycon's suggestion
release_files/install.sh
Outdated
@@ -23,19 +23,28 @@ if command -v sudo > /dev/null && [ "$(id -u)" -ne 0 ]; then | |||
SUDO="sudo" | |||
fi | |||
|
|||
get_latest_release() { | |||
if [ -z ${NETBIRD_RELEASE+x} ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be failing. Can you try the following?
if [ -z ${NETBIRD_RELEASE+x} ]; then | |
if [ "x-$NETBIRD_RELEASE" = "x-" ]; then |
release_files/install.sh
Outdated
|
||
get_release() { | ||
local RELEASE=$1 | ||
if [ "$RELEASE" == "latest" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ "$RELEASE" == "latest" ]; then | |
if [ "$RELEASE" = "latest" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply.
You're right. I only tested my change with bash.
I read through the workflows, and see we test using ubuntu:latest, which default to dash as shell - which in return does not support the "double equal-sign" that bash does.
Sorry about that !
(I've now imported your validation actions to my fork) 😄
We should for sure keep the validation action as-is, as it mimic the current recommended one-line installation behavior on the website. (I should just have tested my change better!)
This is now corrected to be POSIX compatible. (efc8164)
I imported the validation workflows to my fork - seems to go through now :)
@glemsom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @glemsom, that's a great improvement.
You are welcome. And thanks for an awesome product :) |
For installations using the binary release method (using the official installer script), it would be nice to be able to define a specific version to install. A user/developer can choose to define the NETBIRD_RELEASE variable during installation, to pin a specific version during installation. If NETBIRD_RELEASE is not defined, we default to the current behavior of latest
For installations using the binary release method (using the official installer script), it would be nice to be able to define a specific version to install. A user/developer can choose to define the NETBIRD_RELEASE variable during installation, to pin a specific version during installation. If NETBIRD_RELEASE is not defined, we default to the current behavior of latest
Support for specific version installation
For installations using the binary release method (using the official installer script), it would be nice to be able to define a specific version to install.
A user/developer can choose to define the
NETBIRD_RELEASE
variable during installation, to pin a specific version during installation.If
NETBIRD_RELEASE
is not defined, we default to the current behavior oflatest
Example usage (once merged)
Checklist