Only proceed if the spec differs
Avoids overwriting identical specs and burying the old ones.
This commit is contained in:
parent
a08f8e22da
commit
77bd040c1f
3
.github/workflows/ci-openapi.yml
vendored
3
.github/workflows/ci-openapi.yml
vendored
|
@ -176,6 +176,9 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
TGT_DIR="/srv/repository/main/openapi"
|
TGT_DIR="/srv/repository/main/openapi"
|
||||||
LAST_SPEC="$( ls -lt ${TGT_DIR} | grep 'jellyfin-openapi' | head -1 | awk '{ print $NF }' )"
|
LAST_SPEC="$( ls -lt ${TGT_DIR} | grep 'jellyfin-openapi' | head -1 | awk '{ print $NF }' )"
|
||||||
|
if ! diff /srv/incoming/openapi/unstable/jellyfin-openapi-${{ env.JELLYFIN_VERSION }}.json ${TGT_DIR}/unstable/${LAST_SPEC} &>/dev/null; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
sudo mv /srv/incoming/openapi/unstable/jellyfin-openapi-${{ env.JELLYFIN_VERSION }}.json ${TGT_DIR}/unstable/jellyfin-openapi-${{ env.JELLYFIN_VERSION }}.json
|
sudo mv /srv/incoming/openapi/unstable/jellyfin-openapi-${{ env.JELLYFIN_VERSION }}.json ${TGT_DIR}/unstable/jellyfin-openapi-${{ env.JELLYFIN_VERSION }}.json
|
||||||
# Delete previous jellyfin-openapi-unstable_previous.json
|
# Delete previous jellyfin-openapi-unstable_previous.json
|
||||||
sudo rm ${TGT_DIR}/jellyfin-openapi-unstable_previous.json
|
sudo rm ${TGT_DIR}/jellyfin-openapi-unstable_previous.json
|
||||||
|
|
Loading…
Reference in New Issue
Block a user