Skip to content

Commit 1135ad5

Browse files
Skip checkExpectedBranchVersion task on PR Build workflow
Issue gh-15226
1 parent e3d642c commit 1135ad5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/pr-build-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
java-version: '11'
2222
distribution: 'adopt'
2323
- name: Build with Gradle
24-
run: ./gradlew clean build --continue
24+
run: ./gradlew clean build -PskipCheckExpectedBranchVersion --continue
2525
generate-docs:
2626
name: Generate Docs
2727
runs-on: ubuntu-latest

buildSrc/src/main/java/org/springframework/security/CheckExpectedBranchVersionPlugin.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ public static class CheckExpectedBranchVersionTask extends DefaultTask {
4545
@TaskAction
4646
public void run() throws IOException {
4747
Project project = getProject();
48+
if (project.hasProperty("skipCheckExpectedBranchVersion")) {
49+
return;
50+
}
4851
String version = (String) project.getVersion();
4952
String branchVersion = getBranchVersion(project);
5053
if (!branchVersion.matches("^[0-9]+\\.[0-9]+\\.x$")) {

0 commit comments

Comments
 (0)