Repository navigation
CI: Skip plugin repo release when SVN tag already exists #78476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
68e1dff
CI: Skip plugin repo release when SVN tag already exists
48b48a7
Remove check from the upload stage
c957cda
Potential fix for pull request finding
paulopmt1 5640612
CI: Apply tag-exists guard to upload-tag job
b5936eb
Merge branch 'trunk' into fix/skip-existing-svn-tag-on-release
paulopmt1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -227,7 +227,29 @@ jobs: | |
| name: changelog trunk | ||
| path: trunk | ||
|
|
||
| - name: Check if SVN tag already exists | ||
| id: check_svn_tag | ||
| run: | | ||
| svn_error_file="$(mktemp)" | ||
| if svn list "$PLUGIN_REPO_URL/tags/$VERSION" \ | ||
| --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \ | ||
| --non-interactive --no-auth-cache >/dev/null 2>"$svn_error_file"; then | ||
| echo "::warning::SVN tag tags/$VERSION already exists. Skipping release commit to avoid E150002." | ||
| echo "exists=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| svn_status=$? | ||
| if grep -q 'E160013' "$svn_error_file"; then | ||
| echo "exists=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| cat "$svn_error_file" >&2 | ||
| rm -f "$svn_error_file" | ||
| exit "$svn_status" | ||
| fi | ||
| fi | ||
| rm -f "$svn_error_file" | ||
|
|
||
| - name: Commit the release | ||
| if: steps.check_svn_tag.outputs.exists != 'true' | ||
|
Comment on lines
251
to
+252
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with this, looks like we should apply the same fix to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| working-directory: ./trunk | ||
| run: | | ||
| svn st | grep '^?' | awk '{print $2}' | xargs -r svn add | ||
|
|
@@ -279,7 +301,29 @@ jobs: | |
| name: changelog trunk | ||
| path: ${{ github.event.release.name }} | ||
|
|
||
| - name: Check if SVN tag already exists | ||
| id: check_svn_tag | ||
| run: | | ||
| svn_error_file="$(mktemp)" | ||
| if svn list "$PLUGIN_REPO_URL/tags/$VERSION" \ | ||
| --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \ | ||
| --non-interactive --no-auth-cache >/dev/null 2>"$svn_error_file"; then | ||
| echo "::warning::SVN tag tags/$VERSION already exists. Skipping import to avoid E150002." | ||
| echo "exists=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| svn_status=$? | ||
| if grep -q 'E160013' "$svn_error_file"; then | ||
| echo "exists=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| cat "$svn_error_file" >&2 | ||
| rm -f "$svn_error_file" | ||
| exit "$svn_status" | ||
| fi | ||
| fi | ||
| rm -f "$svn_error_file" | ||
|
|
||
| - name: Add the new version directory and commit changes to the SVN repository | ||
| if: steps.check_svn_tag.outputs.exists != 'true' | ||
| run: | | ||
| svn import "$VERSION" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Committing version $VERSION" \ | ||
| --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \ | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.