Sha256: d45b4c0e787a889cc3d608c5b1c5f8897f5631d70001fde2079720d35c71008c

Contents?: true

Size: 927 Bytes

Versions: 6

Compression:

Stored size: 927 Bytes

Contents

#!/bin/bash -ex

echo "Determining if publishing is requested..."

VERSION=$(ruby -I lib -r conjur/version -e 'puts Conjur::VERSION')
echo Declared version: $VERSION

if curl -s https://rubygems.org/api/v1/versions/conjur-cli.json | jq -e ".[] | select(.number == \"$VERSION\")" >/dev/null; then
   echo "Found $VERSION on rubygems, not republishing"
   exit 1
fi
   
# Jenkins git plugin is broken and always fetches with `--no-tags`
# (or `--tags`, neither of which is what you want), so tags end up
# not being fetched. Try to fix that.
# (Unfortunately this fetches all remote heads, so we may have to find
# another solution for bigger repos.)
git fetch -q

# note when tag not found git rev-parse will just print its name
# TAG=`git rev-parse tags/v$VERSION 2>/dev/null || :`
TAG=`git rev-list -n 1 "v$VERSION" 2>/dev/null || :`
echo Tag v$VERSION: $TAG

HEAD=`git rev-parse HEAD`
echo HEAD: $HEAD

test "$HEAD" = "$TAG"

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
conjur-cli-6.2.6 needs-publishing
conjur-cli-6.2.5 needs-publishing
conjur-cli-6.2.4 needs-publishing
conjur-cli-6.2.3 needs-publishing
conjur-cli-6.2.2 needs-publishing
conjur-cli-6.2.1 needs-publishing