Move the error files into the tmp directory

This commit is contained in:
Luni-4 2019-11-15 11:04:28 +01:00
parent 6fafc54dc7
commit c4402a0306
1 changed files with 13 additions and 10 deletions

View File

@ -30,8 +30,6 @@ jobs:
env: env:
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }} CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
ALSA: alsa-sys.txt
CPAL: cpal.txt
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -44,23 +42,28 @@ jobs:
env: env:
MANIFEST: alsa-sys/Cargo.toml MANIFEST: alsa-sys/Cargo.toml
run: | run: |
cargo publish --token $CRATESIO_TOKEN --manifest-path $MANIFEST 2> $ALSA ALSA_TMP=$(mktemp /tmp/alsa-sysXXX.txt) || echo "::error::mktemp error"
echo "::set-env name=ALSA_TMP::$ALSA_TMP"
cargo publish --token $CRATESIO_TOKEN \
--manifest-path $MANIFEST 2> $ALSA_TMP
- name: Check if alsa-sys is already published - name: Check if alsa-sys is already published
run: | run: |
empty=0 empty=0
grep -q '[^[:space:]]' < $ALSA || empty=1 grep -q '[^[:space:]]' < $ALSA_TMP || empty=1
[ $empty -eq 0 ] && cat $ALSA [ $empty -eq 0 ] && cat $ALSA_TMP
[ $empty -eq 1 ] || grep -q "is already uploaded" < $ALSA [ $empty -eq 1 ] || grep -q "is already uploaded" < $ALSA_TMP
- name: Run cargo publish for cpal - name: Run cargo publish for cpal
continue-on-error: true continue-on-error: true
run: | run: |
cargo publish --token $CRATESIO_TOKEN 2> $CPAL CPAL_TMP=$(mktemp /tmp/cpalXXX.txt) || echo "::error::mktemp error"
echo "::set-env name=CPAL_TMP::$CPAL_TMP"
cargo publish --token $CRATESIO_TOKEN 2> $CPAL_TMP
- name: Check if cpal is already published - name: Check if cpal is already published
run: | run: |
empty=0 empty=0
grep -q '[^[:space:]]' < $CPAL || empty=1 grep -q '[^[:space:]]' < $CPAL_TMP || empty=1
[ $empty -eq 0 ] && cat $CPAL [ $empty -eq 0 ] && cat $CPAL_TMP
[ $empty -eq 1 ] || grep -q "is already uploaded" < $CPAL [ $empty -eq 1 ] || grep -q "is already uploaded" < $CPAL_TMP
ubuntu-test: ubuntu-test: