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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ease upgrade procedure #400
Ease upgrade procedure #400
Conversation
The goal is to have
|
do not forget to update bash_completion and zsh_completion. |
The option has no arguments, which made my life easier :) |
I think there is no need of a LATEST file. |
@crownedgrouse, wouldn't that assume that the latest release is always the highest numbered (version-wise) one? I was thinking about the case where a support version is created for an older Maintaining |
Kerl contains KERL_VERSION. Getting latest version using wget can simply tell if versions are same. If not, upgrade can be done. |
I understand, but let's say tomorrow Now let's say you have And this is where it'd get confusing. If maintainers of |
@jadeallenx, any change this gets looked at soon? Thanks. |
kerl
Outdated
current_kerl_path="$(which kerl)" | ||
which_status=$? | ||
if [ $which_status != 0 ]; then | ||
install_folder="/usr/local/bin" |
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 should probably be its own environment variable or otherwise settable to a directory from the command line. (For example, I install my kerl at $HOME/bin/kerl
)
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.
Current kerl is $0 ?
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.
@jadeallenx, agreed. If not set, would the current choice (/usr/local/bin
) be acceptable as a default? Should we document this?
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.
Current kerl is $0 ?
I didn't understand this, sorry. $0
is "current script".
Here (in this place in the code), we're covering the option where kerl
is not yet "installed" anywhere (eg. local Git repo), so @jadeallenx's suggestion makes sense, but maybe I missed something (?)
b857ffa
to
99449e4
Compare
99449e4
to
f33e678
Compare
kerl
Outdated
@@ -2124,6 +2130,15 @@ index caa1ce568b..6ebb3d3a25 100644 | |||
_END_PATCH | |||
} | |||
|
|||
upgrade_kerl() { | |||
install_folder=$1 | |||
wget -q -O "$install_folder/kerl" $KERL_GIT_BASE/kerl |
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.
We use curl
everywhere else in the script currently, can we please use it here too instead of adding a new dependency on wget.
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.
Sure 馃憤
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.
Done in 2d2912a
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.
Thanks!
Really appreciate this. Thank you. |
Thank you, @jadeallenx. |
After #399, I thought an
upgrade
command would be useful, too.@crownedgrouse, here's a shot at it. 馃槃
Assumptions:
(no longer required, as we're usingwget
is available in target systemcurl
)LATEST
is available in thekerl
repository (it would have to be maintained either manually or by some automated mechanism)we want the default installation to go todefault is/usr/local/bin
(this is already mentioned in the README)$PWD
, otherwise$KERL_APP_INSTALL_DIR
(if set)shellcheck
shows a lot of warnings, even if harmless. I can fix those, in a separate commit, if you want. (and then we could use it -shellcheck
- in CI too 馃槃)This also adds an option to
kerl
:KERL_APP_INSTALL_DIR
so the consumer can decide on where to installkerl
fromkerl upgrade
(aREADME.md
update was in order, for this).