diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index f47f1c0..d8a1e98 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -12,7 +12,9 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 2 - name: Accept OSRF software run: | diff --git a/fuel_upload.sh b/fuel_upload.sh index a8b6f87..cd5adaf 100755 --- a/fuel_upload.sh +++ b/fuel_upload.sh @@ -10,12 +10,11 @@ prev_model= while IFS= read -r line; do - type=$(echo "$line" | awk -F'/' '{print $1}') - type=$(echo "$type" | awk -F' ' '{print $2}') + type=$(echo "$line" | awk -F'/' '{print $1}' | awk -F' ' '{print $2}') model=$(echo "$line" | awk -F'/' '{print $2}') # Delete the model from if it exists and is encountered for the first time. - if [[ $model != $prev_model ]]; then + if [[ $model != $prev_model ]] && ([[ $type == "models" ]] || [[ $type == "worlds" ]]); then echo "Trying to delete $model from fuel server" gz fuel delete --header 'Private-token: $FUEL_TOKEN' --url https://fuel.gazebosim.org/1.0/PX4/$type/$model -o PX4