get-dep-refs.sh 585 B

1234567891011
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. get_ref() {
  4. local APP=$1
  5. #echo "{ok,Raw}=file:consult(\"rebar.lock\"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<\"${APP}\">>,1, Deps), io:format(\"~s\",[Ref]), init:stop()."
  6. erl -noshell -eval "{ok,Raw}=file:consult(\"rebar.lock\"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<\"${APP}\">>,1, Deps), io:format(\"~s\",[Ref]), init:stop()."
  7. }
  8. rebar3 get-deps
  9. echo "::set-output name=DEP_ROCKSDB_REF::$(get_ref rocksdb)"
  10. echo "::set-output name=DEP_QUICER_REF::$(get_ref quicer)"