Skip to content

Commit

Permalink
Merge pull request #119 from rabbitmq/rules-erlang-version-inference
Browse files Browse the repository at this point in the history
  • Loading branch information
binarin authored Apr 19, 2023
2 parents ad5adf7 + fda119d commit 3b0b30b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/rabbitmq-oci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,20 @@ jobs:
working-directory: rabbitmq-server
run: |
sed -i"_orig" -E '/APP_VERSION/ s/3\.[0-9]+\.[0-9]+/${{ steps.load-rabbitmq-info.outputs.RABBITMQ_SHA }}/' rabbitmq.bzl
RULES_ERLANG_VERSION=$(bazelisk query --output=build //external:rules_erlang | sed -r -n 's/^.*tag = "(.*)".*$/\1/p')
bazelisk build :package-generic-unix \
--config=rbe-${{ matrix.otp_major }} \
--override_repository rules_erlang~3.9.9~erlang_package~osiris=${{ github.workspace }}/osiris
--override_repository rules_erlang~$RULES_ERLANG_VERSION~erlang_package~osiris=${{ github.workspace }}/osiris
# rules_erlang version detection is not bullet-proof, so let's check that override did indeed work
set -o pipefail
if ! tar --list -f ./bazel-bin/package-generic-unix.tar.xz | grep -F "plugins/osiris-${{ github.event.pull_request.head.sha || github.sha }}/ebin/osiris.app" ; then
echo "Failed to override osiris repo"
echo "Inferred repo name: rules_erlang~$RULES_ERLANG_VERSION~erlang_package~osiris"
echo "Repo name as seen after build:"
ls bazel-bin/external/ | grep osiris
exit 1
fi
- name: Resolve generic unix package path
run: |
Expand Down

0 comments on commit 3b0b30b

Please sign in to comment.