Sha256: c2bd825001a72ab9343ede38d1ec545a86b01e533f34ee1e0f71dfacc93c0c1a

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tiktoken_ruby-0.0.10-x86_64-darwin script/release