trying to fix unbound variable

This commit is contained in:
Anton-4 2022-12-24 15:47:55 +01:00
parent e7d29b8fad
commit ab4628c201
No known key found for this signature in database
GPG Key ID: 0971D718C0A9B937
2 changed files with 21 additions and 6 deletions

View File

@ -12,8 +12,14 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: fetch releases data and save to file
run: curl https://api.github.com/repos/roc-lang/roc/releases > roc_releases.json
# note: moving this step to a bash script will not work, the GITHUB_TOKEN is not passed properly
- name: Fetch releases data and save to file. Authorization is used to prevent rate limiting due to shared IP of github's macos ci servers.
run: |
curl --request GET \
--url https://api.github.com/repos/roc-lang/roc/releases \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--output roc_releases.json
- run: cat roc_releases.json
@ -80,8 +86,14 @@ jobs:
- name: remove all folders except the ci folder
run: shopt -s extglob && rm -r ./!(ci)/
- name: fetch releases data and save to file
run: curl https://api.github.com/repos/roc-lang/roc/releases > roc_releases.json
# note: moving this step to a bash script will not work, the GITHUB_TOKEN is not passed properly
- name: Fetch releases data and save to file. Authorization is used to prevent rate limiting due to shared IP of github's macos ci servers.
run: |
curl --request GET \
--url https://api.github.com/repos/roc-lang/roc/releases \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--output roc_releases.json
- run: echo "ROC_RELEASE_URL=$(./ci/get_latest_release_url.sh linux_x86_64)" >> $GITHUB_ENV

View File

@ -17,9 +17,12 @@ ls | grep "roc_nightly.*tar\.gz" | xargs tar -xzvf
# build the basic cli platform
./roc build ../basic-cli/examples/file.roc
# We need this extra variable so we can safely check if $2 is empty later
EXTRA_ARGS=${2:-}
# In some rare cases it's nice to be able to use the legacy linker, so we produce the .o file to be able to do that
if [[ -n $2 ]]; then
./roc build $2 ../basic-cli/examples/file.roc
if [ ! -z ${EXTRA_ARGS} ];
then ./roc build $EXTRA_ARGS ../basic-cli/examples/file.roc
fi
cd ..