Skip to content

Commit

Permalink
Reconnect Sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl DeBisschop committed Jul 23, 2024
1 parent 0a193ff commit 7f1ad13
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
run: ./gradlew test
- name: Determine coverage
run: ./gradlew jacocoTestReport
# - name: Scan with Sonar
# run: ./gradlew sonar
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Scan with Sonar
run: ./gradlew sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Build with Gradle
run: ./gradlew build
8 changes: 4 additions & 4 deletions src/main/java/com/bioraft/rundeck/nexus/BranchOrVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ public BranchOrVersion(String path) {
artifactId = component(path);
componentVersion = tag(path);
String sep;
if (componentVersion.matches("^.+" + BUILD_SEPARATOR_REGEX + "[a-zA-Z0-9_-]+$")) {
build = componentVersion.replaceFirst("^.+" + BUILD_SEPARATOR_REGEX + "([a-zA-Z0-9_-]+)$", "$1");
versionOrBranch = componentVersion.replaceFirst("^(.+)" + BUILD_SEPARATOR_REGEX + build + "$", "$1");
sep = componentVersion.replaceFirst("^.+(" + BUILD_SEPARATOR_REGEX + ")" + build + "$", "$1");
if (componentVersion.matches("^.+" + BUILD_SEPARATOR_REGEX + "[a-zA-Z0-9]+$")) {
versionOrBranch = componentVersion.replaceFirst("^(.+)" + BUILD_SEPARATOR_REGEX + "[a-zA-Z0-9]+$", "$1");
build = componentVersion.replaceFirst("^" + versionOrBranch + BUILD_SEPARATOR_REGEX + "([a-zA-Z0-9]+)$", "$1");
sep = componentVersion.replaceFirst("^" + versionOrBranch + "(" + BUILD_SEPARATOR_REGEX + ")" + build + "$", "$1");
} else {
build = "";
versionOrBranch = componentVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public void testOne() {
runTest(COMPONENT, "0.1.2", "_", "3");
runTest(COMPONENT, "1.2.1.2", "-", "4");
runTest(COMPONENT, "v1.2.1.5", "-", "6");
runTest(COMPONENT, "v2.2.1.", "_", "16");
runTest(COMPONENT, "v2.2.0.", "_", "beta6");
runTest(COMPONENT, "v2.2.0.", "+", "alpha1");
runTest(COMPONENT, "v2.2.1", "_", "16");
runTest(COMPONENT, "v2.2.0", "_", "beta6");
runTest(COMPONENT, "v2.2.0", "+", "alpha1");
runTest(COMPONENT, "", "", "");
}

Expand Down

0 comments on commit 7f1ad13

Please sign in to comment.