Skip to content

Commit

Permalink
Iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlockwood committed Jan 2, 2024
1 parent 8e0bf5d commit f717920
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
echo "Determining version number for publication"
echo "Looking for an existing release tag against this commit"
echo 'Determining version number for publication'
echo 'Looking for an existing release tag against this commit'

VERSION=$(git describe --tags --match release/* --exact-match 2>&1)
if [ $? -ne 0 ]
Expand All @@ -18,14 +18,25 @@ fi
VERSION=$(echo $VERSION | sed 's#release/##g')
echo "Publishing version: ${VERSION}"

status=$(curl -s --head -w %{http_code} -o /dev/null https://repo1.maven.org/maven2/com/github/dalet-oss/vfs-azure/${VERSION}/)
status=$(curl -s --head -w %{http_code} -o /dev/null https://repo1.maven.org/maven2/com/github/dalet-oss/arangobee/${VERSION}/)
if [ $status -eq 200 ]
then
echo 'Version already available on Maven Central. This must be a rebuild; nothing to do here.'
else
echo 'Version not already available on Maven Central'

# Decrypt the gpg key used for signing
echo 'Decrypting the GPG key used for signing'
echo "Key: ${SONATYPE_GPGKEY_FILE_ENCRYPTION_KEY}"
echo "IV: ${SONATYPE_GPGKEY_FILE_ENCRYPTION_IV}"
openssl aes-256-cbc -K ${SONATYPE_GPGKEY_FILE_ENCRYPTION_KEY} -iv ${SONATYPE_GPGKEY_FILE_ENCRYPTION_IV} -in secret.gpg.enc -out secret.gpg -d
export GPG_TTY=$(tty)
if [ ! -f secret.gpg ]
then
echo 'Decryption failed; bail out'
exit 1
fi
echo 'Decryption successful'

# Work around some nonsense on the specific version of GPG that comes with Ubuntu - see https://www.fluidkeys.com/tweak-gpg-2.1.11/
echo 'allow-loopback-pinentry' >> ~/.gnupg/gpg-agent.conf
Expand Down

0 comments on commit f717920

Please sign in to comment.