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

Improve download scripts #2202

Merged
merged 1 commit into from
Sep 13, 2023
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
7 changes: 3 additions & 4 deletions build/getcli/jf.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

CLI_OS="na"
CLI_UNAME="na"
CLI_MAJOR_VER="v2-jf"
VERSION="[RELEASE]"

Expand All @@ -13,11 +12,11 @@ else
echo "Downloading the latest version of JFrog CLI..."
fi

if $(echo "${OSTYPE}" | grep -q msys); then
if echo "${OSTYPE}" | grep -q msys; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually checked in multiple OSs - MacOS, Ubuntu, Debian, Alpine, Fedora.
Also, the automatic tests check for - MacOS, Ubuntu, Windows.

CLI_OS="windows"
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-windows-amd64/jf.exe"
FILE_NAME="jf.exe"
elif $(echo "${OSTYPE}" | grep -q darwin); then
elif echo "${OSTYPE}" | grep -q darwin; then
CLI_OS="mac"
if [[ $(uname -m) == 'arm64' ]]; then
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-mac-arm64/jf"
Expand Down Expand Up @@ -52,7 +51,7 @@ else
;;
*)
echo "Unknown machine type: $MACHINE_TYPE"
exit -1
exit 1
;;
esac
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-${CLI_OS}-${ARCH}/jf"
Expand Down
7 changes: 3 additions & 4 deletions build/getcli/jfrog.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

CLI_OS="na"
CLI_UNAME="na"
CLI_MAJOR_VER="v2"
VERSION="[RELEASE]"

Expand All @@ -13,11 +12,11 @@ else
echo "Downloading the latest version of JFrog CLI..."
fi

if $(echo "${OSTYPE}" | grep -q msys); then
if echo "${OSTYPE}" | grep -q msys; then
CLI_OS="windows"
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-windows-amd64/jfrog.exe"
FILE_NAME="jfrog.exe"
elif $(echo "${OSTYPE}" | grep -q darwin); then
elif echo "${OSTYPE}" | grep -q darwin; then
CLI_OS="mac"
if [[ $(uname -m) == 'arm64' ]]; then
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-mac-arm64/jfrog"
Expand Down Expand Up @@ -52,7 +51,7 @@ else
;;
*)
echo "Unknown machine type: $MACHINE_TYPE"
exit -1
exit 1
;;
esac
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-${CLI_OS}-${ARCH}/jfrog"
Expand Down
7 changes: 3 additions & 4 deletions build/installcli/jf.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

CLI_OS="na"
CLI_UNAME="na"
CLI_MAJOR_VER="v2-jf"
VERSION="[RELEASE]"
# Order is by destination priority.
Expand All @@ -16,11 +15,11 @@ else
fi
echo ""

if $(echo "${OSTYPE}" | grep -q msys); then
if echo "${OSTYPE}" | grep -q msys; then
CLI_OS="windows"
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-windows-amd64/jf.exe"
FILE_NAME="jf.exe"
elif $(echo "${OSTYPE}" | grep -q darwin); then
elif echo "${OSTYPE}" | grep -q darwin; then
CLI_OS="mac"
if [[ $(uname -m) == 'arm64' ]]; then
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-mac-arm64/jf"
Expand Down Expand Up @@ -55,7 +54,7 @@ else
;;
*)
echo "Unknown machine type: $MACHINE_TYPE"
exit -1
exit 1
;;
esac
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-${CLI_OS}-${ARCH}/jf"
Expand Down
7 changes: 3 additions & 4 deletions build/installcli/jfrog.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

CLI_OS="na"
CLI_UNAME="na"
CLI_MAJOR_VER="v2"
VERSION="[RELEASE]"
# Order is by destination priority.
Expand All @@ -16,11 +15,11 @@ else
fi
echo ""

if $(echo "${OSTYPE}" | grep -q msys); then
if echo "${OSTYPE}" | grep -q msys; then
CLI_OS="windows"
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-windows-amd64/jfrog.exe"
FILE_NAME="jfrog.exe"
elif $(echo "${OSTYPE}" | grep -q darwin); then
elif echo "${OSTYPE}" | grep -q darwin; then
CLI_OS="mac"
if [[ $(uname -m) == 'arm64' ]]; then
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-mac-arm64/jfrog"
Expand Down Expand Up @@ -55,7 +54,7 @@ else
;;
*)
echo "Unknown machine type: $MACHINE_TYPE"
exit -1
exit 1
;;
esac
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-${CLI_OS}-${ARCH}/jfrog"
Expand Down
7 changes: 3 additions & 4 deletions build/setupcli/jf.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

CLI_OS="na"
CLI_UNAME="na"
CLI_MAJOR_VER="v2-jf"
VERSION="[RELEASE]"
# Order is by destination priority.
Expand All @@ -20,11 +19,11 @@ then
fi

echo "Downloading the latest version of JFrog CLI..."
if $(echo "${OSTYPE}" | grep -q msys); then
if echo "${OSTYPE}" | grep -q msys; then
CLI_OS="windows"
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-windows-amd64/jf.exe"
FILE_NAME="jf.exe"
elif $(echo "${OSTYPE}" | grep -q darwin); then
elif echo "${OSTYPE}" | grep -q darwin; then
CLI_OS="mac"
if [[ $(uname -m) == 'arm64' ]]; then
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-mac-arm64/jf"
Expand Down Expand Up @@ -59,7 +58,7 @@ else
;;
*)
echo "Unknown machine type: $MACHINE_TYPE"
exit -1
exit 1
;;
esac
URL="https://releases.jfrog.io/artifactory/jfrog-cli/${CLI_MAJOR_VER}/${VERSION}/jfrog-cli-${CLI_OS}-${ARCH}/jf"
Expand Down
Loading