mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Cirrus: Reimplement release archive + upload
The initial implementation was far more complicated than necessary. Strip out the complexities in favor of a simpler and more direct approach. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -35,10 +35,15 @@ req_env_var() {
|
||||
|
||||
gcloud_init() {
|
||||
set +xe
|
||||
TMPF=$(mktemp -p '' .$(uuidgen)XXXX)
|
||||
trap "rm -f $TMPF" EXIT
|
||||
echo "$GCPJSON" > $TMPF && \
|
||||
$GCLOUD auth activate-service-account --project "$GCPPROJECT" --key-file=$TMPF || \
|
||||
if [[ -n "$1" ]] && [[ -r "$1" ]]
|
||||
then
|
||||
TMPF="$1"
|
||||
else
|
||||
TMPF=$(mktemp -p '' .$(uuidgen)_XXXX.json)
|
||||
trap "rm -f $TMPF &> /dev/null" EXIT
|
||||
echo "$GCPJSON" > $TMPF
|
||||
fi
|
||||
$GCLOUD auth activate-service-account --project="$GCPPROJECT" --key-file="$TMPF" || \
|
||||
die 5 FATAL auth
|
||||
rm -f $TMPF
|
||||
rm -f $TMPF &> /dev/null || true # ignore any read-only error
|
||||
}
|
||||
|
Reference in New Issue
Block a user