...

Text file src/edge-infra.dev/hack/release/push_edge_tarballs.sh

Documentation: edge-infra.dev/hack/release

     1#!/usr/bin/env bash
     2
     3output_script_path="$1"
     4linux_tarball="$2"
     5darwin_tarball="$3"
     6edge_name="$4"
     7bucket="${BINARY_RELEASE_BUCKET:-"edge-bin"}"
     8
     9while read -u 10 p ; do
    10    key=$(echo $p | cut -d ' ' -f1)
    11    value=$(echo $p | cut -d ' ' -f2)
    12    command="export $key=$value"
    13    eval $command
    14done 10<bazel-out/stable-status.txt
    15
    16short_sha="$(echo $STABLE_APP_GIT_COMMIT | cut -c1-7)"
    17semver="$(echo $STABLE_APP_SEMVER)"
    18echo $STABLE_APP_GIT_COMMIT
    19echo $semver
    20echo "#!/usr/bin/env bash" > $output_script_path
    21echo "set -x" >> $output_script_path
    22
    23remote_path="gs://${bucket}/${edge_name}-latest-linux-amd64.tar.gz"
    24echo "echo \"copying linux tarball to $remote_path\"" >> $output_script_path
    25command="gsutil -m -o \"GSUtil:parallel_process_count=1\" cp -r $linux_tarball $remote_path"
    26echo $command >> $output_script_path
    27echo
    28
    29remote_path="gs://${bucket}/${edge_name}-${semver}-linux-amd64.tar.gz"
    30echo "echo \"copying linux tarball to $remote_path\"" >> $output_script_path
    31command="gsutil -m -o \"GSUtil:parallel_process_count=1\" cp -r $linux_tarball $remote_path"
    32echo $command >> $output_script_path
    33echo
    34
    35remote_path="gs://${bucket}/${edge_name}-${short_sha}-linux-amd64.tar.gz"
    36echo "echo \"copying linux tarball to $remote_path\"" >> $output_script_path
    37command="gsutil -m -o \"GSUtil:parallel_process_count=1\" cp -r $linux_tarball $remote_path"
    38echo $command >> $output_script_path
    39echo
    40
    41remote_path="gs://${bucket}/${edge_name}-latest-darwin-amd64.tar.gz"
    42echo "echo \"copying darwin tarball to $remote_path\"" >> $output_script_path
    43command="gsutil -m -o \"GSUtil:parallel_process_count=1\" cp -r $darwin_tarball $remote_path"
    44echo $command >> $output_script_path
    45echo
    46
    47remote_path="gs://${bucket}/${edge_name}-${semver}-darwin-amd64.tar.gz"
    48echo "echo \"copying darwin tarball to $remote_path\"" >> $output_script_path
    49command="gsutil -m -o \"GSUtil:parallel_process_count=1\" cp -r $darwin_tarball $remote_path" >> $output_script_path
    50echo $command >> $output_script_path
    51echo
    52
    53remote_path="gs://${bucket}/${edge_name}-${short_sha}-darwin-amd64.tar.gz"
    54echo "echo \"copying darwin tarball to $remote_path\"" >> $output_script_path
    55command="gsutil -m -o \"GSUtil:parallel_process_count=1\" cp -r $darwin_tarball $remote_path" >> $output_script_path
    56echo $command >> $output_script_path
    57echo

View as plain text