Loading python/semantic-release/version.yml +10 −2 Original line number Diff line number Diff line Loading @@ -5,8 +5,16 @@ python:semantic-release:version: script: - pip install python-semantic-release # 1. semantic release will bump versions in files -> we want this # 2. THEN it will try to commit to git -> we don't want this! -> we let it fail and hide the output - env -u GIT_AUTHOR_NAME -u GIT_AUTHOR_EMAIL -u GIT_COMMITTER_NAME -u GIT_COMMITTER_EMAIL semantic-release version &>/dev/null || true # 2. THEN it will try to commit to git -> we don't want this! -> we allow it to fail if it fails on the git commit - SEMANTIC_LOG=$(env -u GIT_AUTHOR_NAME -u GIT_AUTHOR_EMAIL -u GIT_COMMITTER_NAME -u GIT_COMMITTER_EMAIL semantic-release version 2>&1 || true) - | ALLOWED_GIT_ERROR="Cmd('git') failed due to: exit code(128)" if grep -q "${ALLOWED_GIT_ERROR}" <<< "${SEMANTIC_LOG}"; then echo "[+] Successfully parsed files using semantic release." else echo "${SEMANTIC_LOG}" exit 1 fi - CHANGED_FILES=$(git diff --cached --name-status | cut -f2) - | if [ ! -z "${CHANGED_FILES}" ]; then Loading Loading
python/semantic-release/version.yml +10 −2 Original line number Diff line number Diff line Loading @@ -5,8 +5,16 @@ python:semantic-release:version: script: - pip install python-semantic-release # 1. semantic release will bump versions in files -> we want this # 2. THEN it will try to commit to git -> we don't want this! -> we let it fail and hide the output - env -u GIT_AUTHOR_NAME -u GIT_AUTHOR_EMAIL -u GIT_COMMITTER_NAME -u GIT_COMMITTER_EMAIL semantic-release version &>/dev/null || true # 2. THEN it will try to commit to git -> we don't want this! -> we allow it to fail if it fails on the git commit - SEMANTIC_LOG=$(env -u GIT_AUTHOR_NAME -u GIT_AUTHOR_EMAIL -u GIT_COMMITTER_NAME -u GIT_COMMITTER_EMAIL semantic-release version 2>&1 || true) - | ALLOWED_GIT_ERROR="Cmd('git') failed due to: exit code(128)" if grep -q "${ALLOWED_GIT_ERROR}" <<< "${SEMANTIC_LOG}"; then echo "[+] Successfully parsed files using semantic release." else echo "${SEMANTIC_LOG}" exit 1 fi - CHANGED_FILES=$(git diff --cached --name-status | cut -f2) - | if [ ! -z "${CHANGED_FILES}" ]; then Loading