Skip to content

Commit 5178677

Browse files
feat: cataclysm TLG support [macata #97] (#98)
1 parent 41b648b commit 5178677

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@ jobs:
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
4141
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
42-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=dazednconfused_macata-launcher
42+
run: |
43+
mvn -B verify sonar:sonar \
44+
-Dsonar.projectKey=dazednconfused_macata-launcher \
45+
-Dsonar.organization=dazednconfused \
46+
-Dsonar.token=$SONAR_TOKEN

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<maven.compiler.target>11</maven.compiler.target>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1515

16-
<sonar.organization>dazednconfused</sonar.organization>
16+
<sonar.organization>dazednconfused</sonar.organization> <!-- should match .github/workflows/sonarcloud.yml -->
17+
<sonar.projectKey>dazednconfused_macata-launcher</sonar.projectKey> <!-- ^ditto -->
1718
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
1819
<sonar.cpd.exclusions>**/gui/**</sonar.cpd.exclusions>
1920
</properties>

src/main/resources/osx_launcher_wrapper.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ else
2020
export ${K_LIBRARY_PATH}=. ${K_FRAMEWORK_PATH}=.
2121
fi
2222

23-
# check if 'cataclysm-tiles' or 'cataclysm-bn-tiles' exists, and run the appropriate one
24-
if [[ -f ./cataclysm-tiles ]]; then
25-
EXECUTABLE="./cataclysm-tiles"
26-
elif [[ -f ./cataclysm-bn-tiles ]]; then
27-
EXECUTABLE="./cataclysm-bn-tiles"
28-
else
23+
# find the first matching executable that starts with "cataclysm-" and is executable
24+
for candidate in ./cataclysm-*; do
25+
if [[ -x "$candidate" && ! -d "$candidate" ]]; then
26+
EXECUTABLE="$candidate"
27+
break
28+
fi
29+
done
30+
31+
if [[ -z "$EXECUTABLE" ]]; then
2932
echo "No valid executable found!"
3033
exit 1
3134
fi

0 commit comments

Comments
 (0)