Compare commits
No commits in common. "fc6bb43616c5427c7c6289dd38cf6616139dfaff" and "a50dcf6ad974116540d4d5db12063b5ec14bfd3e" have entirely different histories.
fc6bb43616
...
a50dcf6ad9
1 changed files with 2 additions and 3 deletions
|
|
@ -45,7 +45,7 @@ download_binaries () {
|
|||
|
||||
#'.[0].assets.[].browser_download_url'
|
||||
[[ "${TAG}" == "" ]] && TAG=$(curl --silent "${GIT_SERVER}api/v1/repos/${REPO_PATH}releases/?limit=1" | jq -r '.[0].tag_name')
|
||||
echo "Deploy ${TAG} binaries"
|
||||
echo "${TAG}"
|
||||
|
||||
BIN_PATH="/opt/two/${TAG}/bin/"
|
||||
LN_PATH="/opt/two/bin/"
|
||||
|
|
@ -53,13 +53,12 @@ download_binaries () {
|
|||
exec_with_dry_run "${DRY_RUN}" "mkdir -p \"${BIN_PATH}\""
|
||||
exec_with_dry_run "${DRY_RUN}" "mkdir -p \"${LN_PATH}\""
|
||||
|
||||
curl --silent "${GIT_SERVER}api/v1/repos/${REPO_PATH}releases/tags/${TAG}" | jq -c '.assets[]' | while read tmp
|
||||
curl --silent "${GIT_SERVER}api/v1/repos/${REPO_PATH}releases/tags/${TAG}" | jq -c '.assets.[]' | while read tmp
|
||||
do
|
||||
BINARY_NAME=$(echo "${tmp}" | jq -r '.name')
|
||||
BINARY_SHORT_NAME=$(echo "${BINARY_NAME}" | cut -d_ -f 1)
|
||||
BINARY_URL=$(echo "${tmp}" | jq -r '.browser_download_url')
|
||||
exec_with_dry_run "${DRY_RUN}" "curl --silent '${BINARY_URL}' -o '${BIN_PATH}${BINARY_NAME}'"
|
||||
exec_with_dry_run "${DRY_RUN}" "chmod +x '${BIN_PATH}${BINARY_NAME}'"
|
||||
exec_with_dry_run "${DRY_RUN}" "rm -f '${LN_PATH}${BINARY_SHORT_NAME}'"
|
||||
exec_with_dry_run "${DRY_RUN}" "ln -s '${BIN_PATH}${BINARY_NAME}' '${LN_PATH}${BINARY_SHORT_NAME}'"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue