Sha256: 45416a81296acde48175f3b6bf55a1e9a10ed92322dd266b670820caf0d926d6

Contents?: true

Size: 573 Bytes

Versions: 5

Compression:

Stored size: 573 Bytes

Contents

#!/usr/bin/env bash

set -euo pipefail
IFS=$'\n\t'

mkdir -p ~/.gem/
temp_file=$(mktemp)

# Revert change the credentials file
function revert_gem_cred_switch {
  mv "$temp_file" ~/.gem/credentials
}

if [[ -f ~/.gem/credentials ]]; then
  echo "Temporarily moving existing credentials to $temp_file"
  mv ~/.gem/credentials "$temp_file"
  trap revert_gem_cred_switch EXIT
fi

cat <<EOD > ~/.gem/credentials
---
:rubygems_api_key: $RUBYGEMS_API_KEY
EOD
chmod 600 ~/.gem/credentials

set -x
rm -rf pkg/
mkdir -p pkg/
bundle install
bundle exec rake build
gem push pkg/*.gem

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gitlab-fluent-plugin-redis-slowlog-0.1.2 tools/deploy-rubygem.sh
gitlab-fluent-plugin-redis-slowlog-0.1.1 tools/deploy-rubygem.sh
gitlab-fluent-plugin-redis-slowlog-0.1.0 tools/deploy-rubygem.sh
gitlab-fluent-plugin-redis-slowlog-0.0.2 tools/deploy-rubygem.sh
gitlab-fluent-plugin-redis-slowlog-0.0.1 tools/deploy-rubygem.sh