Skip to content

Commit a7cbf0e

Browse files
committed
TEMP - Do Not Merge; this is just to rerun old documentation versions for historical purposes and avoid the issues with ruby's new caching setup
1 parent cb7bc14 commit a7cbf0e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/update-documentation.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,18 @@ jobs:
7777
with:
7878
name: Generate Docs
7979
ref: ${{ inputs.tag }}
80-
run: ./go ${{ needs.parse.outputs.language }}:docs
80+
run: |
81+
RUBY_VER=$(cat rb/.ruby-version)
82+
curl -fsSL -o /tmp/ruby.tar.gz \
83+
"https://github.com/jdx/ruby/releases/download/${RUBY_VER}/ruby-${RUBY_VER}.x86_64_linux.tar.gz"
84+
NEW_SHA=$(sha256sum /tmp/ruby.tar.gz | awk '{print $1}')
85+
RR_VER=$(grep -oE 'rules_ruby[^0-9]+[0-9]+\.[0-9]+\.[0-9]+' MODULE.bazel | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
86+
git clone --depth 1 --branch "v${RR_VER}" \
87+
https://github.com/bazel-contrib/rules_ruby /tmp/rules_ruby
88+
sed -i -E "s|(\"ruby-${RUBY_VER}\.x86_64_linux\.tar\.gz\"[[:space:]]*:[[:space:]]*\")[0-9a-f]{64}|\1${NEW_SHA}|" \
89+
/tmp/rules_ruby/ruby/private/portable_ruby_checksums.bzl
90+
echo "common --override_module=rules_ruby=/tmp/rules_ruby" >> .bazelrc
91+
./go ${{ needs.parse.outputs.language }}:docs
8192
artifact-name: documentation-${{ needs.parse.outputs.language }}
8293
artifact-path: build/docs/api/**/*
8394

0 commit comments

Comments
 (0)