Sha256: 5878d10203ab121c982bfe6a8b3b21e789695c93b061ff00f80bb83d440e1b01

Contents?: true

Size: 1.04 KB

Versions: 71

Compression:

Stored size: 1.04 KB

Contents

#!/usr/bin/env bash

# This script verifies integrity of the Pro license
# Run it before bundle install to ensure, that what you are fetching is what you expect
# Run it after bundle install to ensure that the local artefact was not compromised

#!/usr/bin/env bash

set -e

if [ "$MODE" != "after" ]; then
  # Check the remote license prior to bundle installing
  curl \
    --retry 5 \
    --retry-delay 1 \
    --fail \
    -u $KARAFKA_PRO_USERNAME:$KARAFKA_PRO_PASSWORD \
    https://gems.karafka.io/gems/karafka-license-$KARAFKA_PRO_VERSION.gem \
    -o ./karafka-license.gem
else
  # Check the local cached one after bundle install
  cache_path=`ruby -e 'puts "#{Gem.dir}/cache/"'`
  cp "$cache_path/karafka-license-$KARAFKA_PRO_VERSION.gem" ./karafka-license.gem
fi

detected=`sha256sum ./karafka-license.gem | awk '{ print $1 }'`

rm ./karafka-license.gem

echo -n "Karafka Pro license artifact checksum verification result: "

if [ "$detected" = "$KARAFKA_PRO_LICENSE_CHECKSUM" ]; then
  echo "Success"
else
  echo -e "\033[0;31mFailure!\033[0m"
  exit 1
fi

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
karafka-2.4.17 bin/verify_license_integrity
karafka-2.4.16 bin/verify_license_integrity
karafka-2.4.15 bin/verify_license_integrity
karafka-2.4.14 bin/verify_license_integrity
karafka-2.4.13 bin/verify_license_integrity
karafka-2.4.12 bin/verify_license_integrity
karafka-2.4.11 bin/verify_license_integrity
karafka-2.4.10 bin/verify_license_integrity
karafka-2.4.9 bin/verify_license_integrity
karafka-2.4.8 bin/verify_license_integrity
karafka-2.4.7 bin/verify_license_integrity
karafka-2.4.6 bin/verify_license_integrity
karafka-2.4.5 bin/verify_license_integrity
karafka-2.4.4 bin/verify_license_integrity
karafka-2.4.3 bin/verify_license_integrity
karafka-2.4.0 bin/verify_license_integrity
karafka-2.4.0.rc1 bin/verify_license_integrity
karafka-2.3.4 bin/verify_license_integrity
karafka-2.4.0.beta2 bin/verify_license_integrity
karafka-2.4.0.beta1 bin/verify_license_integrity