Skip gpg signing if .sig file is already there
Fix https://github.com/bazelbuild/bazel/issues/1990
--
MOS_MIGRATED_REVID=137262738
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh
index d944e57..1380e1e 100755
--- a/scripts/ci/build.sh
+++ b/scripts/ci/build.sh
@@ -459,10 +459,13 @@
else
local destfile=${tmpdir}/$filename-${platform}
fi
- mv $file $destfile
- checksum $destfile > $destfile.sha256
- rm -f "$destfile.sig"
- gpg --no-tty --detach-sign -u "${APT_GPG_KEY_ID}" "$destfile"
+ # bazel.tar.gz is duplicated under different platforms
+ # if the file is already there, skip signing and checksum it again.
+ if [ ! -f "$destfile" ]; then
+ mv $file $destfile
+ checksum $destfile > $destfile.sha256
+ gpg --no-tty --detach-sign -u "${APT_GPG_KEY_ID}" "$destfile"
+ fi
fi
done
done