Sha256: ee297d8cc39ac10860dff737ce5b0a895024d9ca9909b6b157dd98b8cf417253

Contents?: true

Size: 854 Bytes

Versions: 3

Compression:

Stored size: 854 Bytes

Contents

#!/usr/bin/env bash

set -e

if [ -z "${TIKTOKEN_PUBLISH_KEY}" ]; then
  echo "Error: TIKTOKEN_PUBLISH_KEY is not set. This is the RubyGems API key to push the gem."
  exit 1
fi

version=$(grep VERSION lib/tiktoken_ruby/version.rb  | head -n 1 | cut -d'"' -f2)
echo "Building tiktoken_ruby v$version"

targets=(
  "arm64-darwin"
  "x86_64-darwin"
  "aarch64-linux"
  "x86_64-linux"
  "x86_64-linux-musl"
  "arm-linux"
  "x64-mingw-ucrt"
)

for target in "${targets[@]}"; do
  bundle exec rb-sys-dock -p "$target" --ruby-versions 3.2 --build
done

for gem in pkg/tiktoken_ruby-"$version"-*.gem ; do
    GEM_HOST_API_KEY="${TIKTOKEN_PUBLISH_KEY}" gem push "$gem" --host https://rubygems.org
done

# last but not least
bundle exec rake package
GEM_HOST_API_KEY="${TIKTOKEN_PUBLISH_KEY}" gem push "pkg/tiktoken_ruby-$version.gem" --host https://rubygems.org

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tiktoken_ruby-0.0.10-x86_64-linux script/release
tiktoken_ruby-0.0.10-x86_64-linux-musl script/release
tiktoken_ruby-0.0.10-aarch64-linux script/release