update script

pull/97/head
Muhammad Atif Ali 2 years ago
parent 04b6d8723c
commit 7d98ca6e4e

@ -1,11 +1,16 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
BOLD='\033[0;1m'
printf "$${BOLD}Installing JFrog CLI..."
# Install the JFrog CLI.
curl -fL https://install-cli.jfrog.io | sudo sh
sudo chmod 755 /usr/local/bin/jf
# check if JFrog CLI is already installed
if command -v jf >/dev/null 2>&1; then
echo "✅ JFrog CLI is already installed, skipping installation."
else
echo "📦 Installing JFrog CLI..."
# Install the JFrog CLI.
curl -fL https://install-cli.jfrog.io | sudo sh
sudo chmod 755 /usr/local/bin/jf
fi
# The jf CLI checks $CI when determining whether to use interactive
# flows.
@ -32,6 +37,7 @@ if [ -z "${REPOSITORY_PYPI}" ]; then
echo "🤔 REPOSITORY_PYPI is not set, skipping pip configuration."
else
echo "🐍 Configuring pip..."
jf pipc --global --repo-resolve ${JFROG_URL}/artifactory/api/pypi/${REPOSITORY_PYPI}
mkdir -p ~/.pip
cat <<EOF >~/.pip/pip.conf
[global]
@ -44,6 +50,7 @@ if [ -z "${REPOSITORY_GO}" ]; then
echo "🤔 REPOSITORY_GO is not set, skipping go configuration."
else
echo "🐹 Configuring go..."
jf go-config --global --repo-resolve ${JFROG_URL}/artifactory/api/go/${REPOSITORY_GO}
export GOPROXY="https://${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}@${JFROG_HOST}/artifactory/api/go/${REPOSITORY_GO}"
fi
echo "🥳 Configuration complete!"

Loading…
Cancel
Save