Skip to content

Commit

Permalink
Add artifact building and fix broken SQL statement
Browse files Browse the repository at this point in the history
  • Loading branch information
RhythmicSys committed Nov 15, 2024
1 parent b1ae2c6 commit 646f045
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

# Build and verify
- run: mvn --batch-mode --update-snapshots verify

# Prepare the artifact for upload
- run: mkdir staging && cp target/*.jar staging

# Upload artifact
- uses: actions/upload-artifact@v4
with:
name: Package
path: staging

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public boolean setHome(OfflinePlayer player, String homeName, Player onlinePlaye
homeExists.setString(2, homeName);

try (ResultSet resultSet = homeExists.executeQuery()) {
if (resultSet.getInt("count") > 0) { // Home exists
if (resultSet.next() && resultSet.getInt("count") > 0) { // Home exists
if (!overwrite) {
return false; // Don't overwrite, return false
}
Expand Down

0 comments on commit 646f045

Please sign in to comment.