Improve update.sh script to fetch latest version automatically

This commit is contained in:
Tom McLaughlin
2023-09-09 19:59:04 -07:00
parent c75f4f640a
commit ce371a2c96

View File

@@ -1,6 +1,13 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# First, manually update Gemfile
set -eu -o pipefail
cd "$(dirname "$0")"
# Update Gemfile with the latest iruby version
echo "source 'https://rubygems.org'" > Gemfile
echo -n "gem 'iruby', " >> Gemfile
nix shell .#curl -c curl https://rubygems.org/api/v1/gems/iruby.json | nix shell .#jq -c jq .version >> Gemfile
# Regenerate Gemfile.lock
nix shell .#bundler -c bundle lock