Skip to content
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

feat: change terminusd binary name #610

Merged
merged 3 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions build/installer/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [[ x"$VERSION" == x"" ]]; then
fi

if [[ "x${VERSION}" == "x" || "x${VERSION:3}" == "xVERSION__" ]]; then
echo "error: unable to get the wanted Terminus version, please set the VERSION env var and rerun this script."
echo "error: unable to get the wanted Olares version, please set the VERSION env var and rerun this script."
echo "for example: VERSION=1.0.0 bash ./install.sh"
exit 1
fi
Expand Down Expand Up @@ -62,47 +62,47 @@ if [ ! -d $BASE_DIR ]; then
mkdir -p $BASE_DIR
fi

CLI_VERSION="0.1.45"
CLI_FILE="terminus-cli-v${CLI_VERSION}_linux_${ARCH}.tar.gz"
CLI_VERSION="0.1.46"
CLI_FILE="olares-cli-v${CLI_VERSION}_linux_${ARCH}.tar.gz"
if [[ x"$os_type" == x"Darwin" ]]; then
CLI_FILE="terminus-cli-v${CLI_VERSION}_darwin_${ARCH}.tar.gz"
CLI_FILE="olares-cli-v${CLI_VERSION}_darwin_${ARCH}.tar.gz"
fi

if [[ ! -f ${CLI_FILE} ]]; then
CLI_URL="https://dc3p1870nn3cj.cloudfront.net/${CLI_FILE}"

echo "downloading Terminus installer from ${CLI_URL} ..."
echo "downloading Olares installer from ${CLI_URL} ..."
echo ""

curl -Lo ${CLI_FILE} ${CLI_URL}

if [[ $? -ne 0 ]]; then
echo "error: failed to download Terminus installer"
echo "error: failed to download Olares installer"
exit 1
else
echo "Terminus installer ${CLI_VERSION} download complete!"
echo "Olares installer ${CLI_VERSION} download complete!"
echo ""
fi
fi

INSTALL_TERMINUS_CLI="/usr/local/bin/terminus-cli"
echo "unpacking Terminus installer to $INSTALL_TERMINUS_CLI..."
INSTALL_OLARES_CLI="/usr/local/bin/olares-cli"
echo "unpacking Olares installer to $INSTALL_OLARES_CLI..."
echo ""
tar -zxf ${CLI_FILE} && chmod +x terminus-cli
tar -zxf ${CLI_FILE} && chmod +x olares-cli
if [[ x"$os_type" == x"Darwin" ]]; then
if [ ! -f "/usr/local/Cellar/terminus" ]; then
if [ ! -f "/usr/local/Cellar/olares" ]; then
current_user=$(whoami)
$sh_c "sudo mkdir -p /usr/local/Cellar/terminus && sudo chown ${current_user}:staff /usr/local/Cellar/terminus"
$sh_c "sudo mkdir -p /usr/local/Cellar/olares && sudo chown ${current_user}:staff /usr/local/Cellar/olares"
fi
$sh_c "mv terminus-cli /usr/local/Cellar/terminus/terminus-cli && \
sudo rm -rf /usr/local/bin/terminus-cli && \
sudo ln -s /usr/local/Cellar/terminus/terminus-cli $INSTALL_TERMINUS_CLI"
$sh_c "mv olares-cli /usr/local/Cellar/olares/olares-cli && \
sudo rm -rf /usr/local/bin/olares-cli && \
sudo ln -s /usr/local/Cellar/olares/olares-cli $INSTALL_OLARES_CLI"
else
$sh_c "mv terminus-cli $INSTALL_TERMINUS_CLI"
$sh_c "mv olares-cli $INSTALL_OLARES_CLI"
fi

if [[ $? -ne 0 ]]; then
echo "error: failed to unpack Terminus installer"
echo "error: failed to unpack Olares installer"
exit 1
fi

Expand All @@ -114,15 +114,15 @@ if [ -f $BASE_DIR/.prepared ]; then
else
echo "downloading installation wizard..."
echo ""
$sh_c "$INSTALL_TERMINUS_CLI terminus download wizard $PARAMS"
$sh_c "$INSTALL_OLARES_CLI terminus download wizard $PARAMS"
if [[ $? -ne 0 ]]; then
echo "error: failed to download installation wizard"
exit 1
fi

echo "downloading installation packages..."
echo ""
$sh_c "$INSTALL_TERMINUS_CLI terminus download component $PARAMS"
$sh_c "$INSTALL_OLARES_CLI terminus download component $PARAMS"
if [[ $? -ne 0 ]]; then
echo "error: failed to download installation packages"
exit 1
Expand All @@ -134,7 +134,7 @@ else
if [ x"$REGISTRY_MIRRORS" != x"" ]; then
extra="--registry-mirrors $REGISTRY_MIRRORS"
fi
$sh_c "$INSTALL_TERMINUS_CLI terminus prepare $PARAMS $extra"
$sh_c "$INSTALL_OLARES_CLI terminus prepare $PARAMS $extra"
if [[ $? -ne 0 ]]; then
echo "error: failed to prepare installation environment"
exit 1
Expand All @@ -150,11 +150,11 @@ if [ "$PREINSTALL" == "1" ]; then
echo "Pre Install mode is specified by the \"PREINSTALL\" env var, skip installing"
exit 0
fi
echo "installing Terminus..."
echo "installing Olares..."
echo ""
$sh_c "$INSTALL_TERMINUS_CLI terminus install $PARAMS"
$sh_c "$INSTALL_OLARES_CLI terminus install $PARAMS"

if [[ $? -ne 0 ]]; then
echo "error: failed to install Terminus"
echo "error: failed to install Olares"
exit 1
fi
2 changes: 1 addition & 1 deletion build/manifest/components
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
terminusd-v0.0.32.tar.gz,pkg/components,https://dc3p1870nn3cj.cloudfront.net/terminusd-v0.0.32-linux-amd64.tar.gz,https://dc3p1870nn3cj.cloudfront.net/terminusd-v0.0.32-linux-arm64.tar.gz,terminusd
olaresd-v0.0.34.tar.gz,pkg/components,https://dc3p1870nn3cj.cloudfront.net/olaresd-v0.0.34-linux-amd64.tar.gz,https://dc3p1870nn3cj.cloudfront.net/olaresd-v0.0.34-linux-arm64.tar.gz,olaresd
socat-1.7.3.2.tar.gz,pkg/components,https://src.fedoraproject.org/lookaside/pkgs/socat/socat-1.7.3.2.tar.gz/sha512/540658b2a3d1b87673196282e5c62b97681bd0f1d1e4759ff9d72909d11060235ee9e9521a973603c1b00376436a9444248e5fbc0ffac65f8edb9c9bc28e7972/socat-1.7.3.2.tar.gz,https://src.fedoraproject.org/lookaside/pkgs/socat/socat-1.7.3.2.tar.gz/sha512/540658b2a3d1b87673196282e5c62b97681bd0f1d1e4759ff9d72909d11060235ee9e9521a973603c1b00376436a9444248e5fbc0ffac65f8edb9c9bc28e7972/socat-1.7.3.2.tar.gz,socat
conntrack-tools-1.4.1.tar.gz,pkg/components,https://github.com/fqrouter/conntrack-tools/archive/refs/tags/conntrack-tools-1.4.1.tar.gz,https://github.com/fqrouter/conntrack-tools/archive/refs/tags/conntrack-tools-1.4.1.tar.gz,conntrack-tools
minio.RELEASE.2023-05-04T21-44-30Z,pkg/components,https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2023-05-04T21-44-30Z,https://dl.min.io/server/minio/release/linux-arm64/archive/minio.RELEASE.2023-05-04T21-44-30Z,minio
Expand Down
Loading