Commit 66de10a6 authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

feat: auto add assets to .releaserc

parent 94841948
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -20,7 +20,11 @@ semantic-release:
      if jq -e '.plugins[3][1].assets[0]' .releaserc >/dev/null 2>&1 && [ ! -z ${BUMPED_FILES} ]; then
        for FILE in ${BUMPED_FILES}; do
          if ! jq -e --arg FILE "$FILE" '.plugins[3][1].assets | index($FILE)' .releaserc > /dev/null; then
            echo "[!] '${FILE}' has changed, but isn't listed in the assets in '.releaserc'. Ensure it is matched, else the version bumped files will not be pushed to your repo."
            echo "[!] '${FILE}' has changed, but isn't listed in the assets in
            '.releaserc'. It will be added for you."
            jq -e --arg FILE "$FILE" '.plugins[3][1].assets |= . + [$FILE]'
            .releaserc > .releaserc.tmp
            mv .releaserc.tmp .releaserc
          fi
        done
      fi