mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-20 15:09:02 +03:00
ci: push cli-ext binary to cdn on tag release
https://github.com/hasura/graphql-engine-mono/pull/1846 GitOrigin-RevId: 1f1d61c88925d412c38d2e790c30de96541b6cc9
This commit is contained in:
parent
454e6afd1d
commit
00902e322e
@ -165,6 +165,22 @@ push_server_binary() {
|
|||||||
gs://graphql-engine-cdn.hasura.io/server/latest/linux-amd64
|
gs://graphql-engine-cdn.hasura.io/server/latest/linux-amd64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
push_cli_ext() {
|
||||||
|
local BUCKET_PATH="gs://graphql-engine-cdn.hasura.io/cli-ext/releases/versioned/${CIRCLE_TAG}"
|
||||||
|
pushd /build/_cli_ext_output/
|
||||||
|
|
||||||
|
# the cli-ext binaries have names in format "cli-ext-hasura-<node version>-<os>-<architecture>"
|
||||||
|
# this transforms the file names into the format "cli-ext-<os>-<architecture>
|
||||||
|
# eg. "cli-ext-hasura-node12-linux-amd64" -> "cli-ext-linux-amd64"
|
||||||
|
for filename in "$(ls)"; do
|
||||||
|
new_filename="$(echo "$filename" | awk -F '-' '{print $1"-"$2"-"$5"-"$6}')"
|
||||||
|
gsutil cp "$filename" "${BUCKET_PATH}/${new_filename}"
|
||||||
|
done
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# skip deploy for pull requests
|
# skip deploy for pull requests
|
||||||
if [[ -n "${CIRCLE_PR_NUMBER:-}" ]]; then
|
if [[ -n "${CIRCLE_PR_NUMBER:-}" ]]; then
|
||||||
echo "not deploying for PRs"
|
echo "not deploying for PRs"
|
||||||
@ -193,6 +209,7 @@ if [[ -z "$CIRCLE_TAG" ]]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
push_cli_ext
|
||||||
deploy_console
|
deploy_console
|
||||||
deploy_server
|
deploy_server
|
||||||
if [[ ! -z "$CIRCLE_TAG" ]]; then
|
if [[ ! -z "$CIRCLE_TAG" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user