From 4a531c6fab93786badf7c99119acf3945b30bdfa Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Sun, 31 Jul 2022 13:06:49 -0700 Subject: [PATCH 01/26] change status placeholer in title to use the placeholder displays in the config --- .../queue/commands/commands/listqueues/ListCommand.java | 4 ++-- .../main/java/us/ajg0702/queue/common/QueueManagerImpl.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/us/ajg0702/queue/commands/commands/listqueues/ListCommand.java b/common/src/main/java/us/ajg0702/queue/commands/commands/listqueues/ListCommand.java index 29d4e0e..53132e3 100644 --- a/common/src/main/java/us/ajg0702/queue/commands/commands/listqueues/ListCommand.java +++ b/common/src/main/java/us/ajg0702/queue/commands/commands/listqueues/ListCommand.java @@ -68,10 +68,10 @@ public class ListCommand extends BaseCommand { m = m.append(Component.text("\n")); m = m.append(main.getMessages().getComponent("commands.listqueues.format", - "COLOR:" + main.getMessages().color(color), + "COLOR:" + Messages.color(color), "NAME:" + s.getAlias(), "COUNT:" + s.getQueue().size(), - "STATUS:" + s.getStatusString(spp) + "STATUS:" + main.getMessages().getRawString("placeholders.status."+s.getStatus(spp)) )); } sender.sendMessage(m); diff --git a/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java b/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java index 22beb0f..5a3d953 100644 --- a/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java +++ b/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java @@ -380,7 +380,6 @@ public class QueueManagerImpl implements QueueManager { if(!main.getConfig().getBoolean("send-title")) return; for(QueueServer server : servers) { - String status = server.getStatusString(); for(QueuePlayer queuePlayer : server.getQueue()) { int pos = queuePlayer.getPosition(); @@ -394,6 +393,8 @@ public class QueueManagerImpl implements QueueManager { if(!getSingleServer(player).equals(server)) continue; + String status = main.getMessages().getRawString("placeholders.status."+server.getStatus(player)); + int time = (int) Math.round(pos * main.getTimeBetweenPlayers()); Component titleMessage = msgs.getComponent("title.title", From 76ab9ef098382dd0be95900c01f19f1589ae001a Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Sun, 31 Jul 2022 13:53:54 -0700 Subject: [PATCH 02/26] Fix color in title status --- .../src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java b/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java index 5a3d953..8c6c158 100644 --- a/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java +++ b/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java @@ -393,7 +393,7 @@ public class QueueManagerImpl implements QueueManager { if(!getSingleServer(player).equals(server)) continue; - String status = main.getMessages().getRawString("placeholders.status."+server.getStatus(player)); + String status = Messages.color(main.getMessages().getRawString("placeholders.status."+server.getStatus(player))); int time = (int) Math.round(pos * main.getTimeBetweenPlayers()); From fc4cf51081014148fa0e9526406574bf1791947e Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Sun, 31 Jul 2022 14:04:04 -0700 Subject: [PATCH 03/26] Added SERVER placeholder to wrong-version message --- .../main/java/us/ajg0702/queue/common/QueueManagerImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java b/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java index 8c6c158..9f67ff8 100644 --- a/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java +++ b/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java @@ -118,7 +118,11 @@ public class QueueManagerImpl implements QueueManager { versions.append(msgs.getString("errors.wrong-version.comma")); } } - player.sendMessage(msgs.getComponent("errors.wrong-version.base", "VERSIONS:" + versions)); + player.sendMessage(msgs.getComponent( + "errors.wrong-version.base", + "VERSIONS:" + versions, + "SERVER:"+server.getAlias() + )); return false; } From b545687b8ddcbf6ea129e16d2b471be5ce9fb5c7 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 12:29:51 -0700 Subject: [PATCH 04/26] fix rare concurrency error --- .../main/java/us/ajg0702/queue/common/QueueManagerImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java b/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java index 22beb0f..8847ed3 100644 --- a/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java +++ b/common/src/main/java/us/ajg0702/queue/common/QueueManagerImpl.java @@ -352,7 +352,8 @@ public class QueueManagerImpl implements QueueManager { AdaptedPlayer player = queuePlayer.getPlayer(); if(player == null) continue; - if(!getSingleServer(player).equals(server)) continue; + QueueServer singleServer = getSingleServer(player); + if(singleServer == null || !singleServer.equals(server)) continue; if(!server.isJoinable(player)) { player.sendActionBar(msgs.getComponent("spigot.actionbar.offline", @@ -392,7 +393,8 @@ public class QueueManagerImpl implements QueueManager { AdaptedPlayer player = queuePlayer.getPlayer(); if(player == null) continue; - if(!getSingleServer(player).equals(server)) continue; + QueueServer singleServer = getSingleServer(player); + if(singleServer == null || !singleServer.equals(server)) continue; int time = (int) Math.round(pos * main.getTimeBetweenPlayers()); From b65626c1bcfcace6ee6a5a9d9ae5c029372ee545 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 13:17:27 -0700 Subject: [PATCH 05/26] Attempt to make automated polymart beta releases --- .github/workflows/prerelease.yml | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/prerelease.yml diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml new file mode 100644 index 0000000..4bd4d30 --- /dev/null +++ b/.github/workflows/prerelease.yml @@ -0,0 +1,44 @@ +name: Deploy Pre-Release to Polymart + +on: + push: + branches: + - dev + + +jobs: + build: + runs-on: ubuntu-latest + environment: polymart_deploy + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'temurin' + - name: Change version to include build + run: | + - export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` + - export NEW_VERSION=`$OLD_VERSION-b${{github.run_number}}` + - sed -i 's/$OLD_VERION/$NEW_VERSION/' build.gradle.kts + - echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') + - name: Build with Gradle + uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 + with: + arguments: :free:shadowJar :premium:shadowJar + - name: Upload build files artifact + uses: actions/upload-artifact@v2.3.1 + with: + # Artifact name + name: build-files + # A file, directory or wildcard pattern that describes what to upload + path: '*/build/*' + # The desired behavior if no files are found using the provided path. + if-no-files-found: error + retention-days: 2 + - name: Deploy to Polymart + env: + POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }} + run: | + - curl -F "file=@free/build/libs/ajQueue-$UPDATE_VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$NEW_VERSION" -F title="Pre-release v$NEW_VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" From dae28143c82006ac8545b8c96b07c4a4a2ec4f65 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 13:18:22 -0700 Subject: [PATCH 06/26] whoops --- .github/workflows/prerelease.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 4bd4d30..9fd78fe 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -19,10 +19,10 @@ jobs: distribution: 'temurin' - name: Change version to include build run: | - - export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` - - export NEW_VERSION=`$OLD_VERSION-b${{github.run_number}}` - - sed -i 's/$OLD_VERION/$NEW_VERSION/' build.gradle.kts - - echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') + export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` + export NEW_VERSION=`$OLD_VERSION-b${{github.run_number}}` + sed -i 's/$OLD_VERION/$NEW_VERSION/' build.gradle.kts + echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - name: Build with Gradle uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 with: @@ -41,4 +41,4 @@ jobs: env: POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }} run: | - - curl -F "file=@free/build/libs/ajQueue-$UPDATE_VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$NEW_VERSION" -F title="Pre-release v$NEW_VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" + curl -F "file=@free/build/libs/ajQueue-$UPDATE_VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$NEW_VERSION" -F title="Pre-release v$NEW_VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" From 063b60b23d715f204475a5b66eea546b8c7d251e Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 13:19:54 -0700 Subject: [PATCH 07/26] whoops x2 --- .github/workflows/prerelease.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 9fd78fe..62a81f7 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -20,7 +20,7 @@ jobs: - name: Change version to include build run: | export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` - export NEW_VERSION=`$OLD_VERSION-b${{github.run_number}}` + export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} sed -i 's/$OLD_VERION/$NEW_VERSION/' build.gradle.kts echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - name: Build with Gradle @@ -41,4 +41,5 @@ jobs: env: POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }} run: | + file free/build/libs/ajQueue-$UPDATE_VERSION.jar curl -F "file=@free/build/libs/ajQueue-$UPDATE_VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$NEW_VERSION" -F title="Pre-release v$NEW_VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" From 62bac897be2a4e90b48c8157c2ad1dde7aff66d6 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 13:21:17 -0700 Subject: [PATCH 08/26] commit spam lets gooo --- .github/workflows/prerelease.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 62a81f7..26fdd89 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -22,7 +22,7 @@ jobs: export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} sed -i 's/$OLD_VERION/$NEW_VERSION/' build.gradle.kts - echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') + echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') ($NEW_VERSION) - name: Build with Gradle uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 with: @@ -41,5 +41,5 @@ jobs: env: POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }} run: | - file free/build/libs/ajQueue-$UPDATE_VERSION.jar - curl -F "file=@free/build/libs/ajQueue-$UPDATE_VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$NEW_VERSION" -F title="Pre-release v$NEW_VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" + file free/build/libs/ajQueue-$NEW_VERSION.jar + curl -F "file=@free/build/libs/ajQueue-$NEW_VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$NEW_VERSION" -F title="Pre-release v$NEW_VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" From 47f09d0ff7e3b8617d7007004c43f17035adb43b Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 13:22:04 -0700 Subject: [PATCH 09/26] commit spam lets gooooo --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 26fdd89..ebb5be4 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -22,7 +22,7 @@ jobs: export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} sed -i 's/$OLD_VERION/$NEW_VERSION/' build.gradle.kts - echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') ($NEW_VERSION) + echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - $NEW_VERSION - name: Build with Gradle uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 with: From f25f46077c15e5650add2a8f5451a3e4f6fd0522 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 13:30:42 -0700 Subject: [PATCH 10/26] it might work ths time --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index ebb5be4..455a26f 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -21,7 +21,7 @@ jobs: run: | export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} - sed -i 's/$OLD_VERION/$NEW_VERSION/' build.gradle.kts + sed -i "s/$OLD_VERION/$NEW_VERSION/" build.gradle.kts echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - $NEW_VERSION - name: Build with Gradle uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 From e226d57c6312ac08db8d16ac873f90633bc4754c Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 13:32:05 -0700 Subject: [PATCH 11/26] maybe it might work ths time --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 455a26f..2c85dea 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -21,7 +21,7 @@ jobs: run: | export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} - sed -i "s/$OLD_VERION/$NEW_VERSION/" build.gradle.kts + cat build.gradle.kts | sed "s/$OLD_VERION/$NEW_VERSION/" > build.gradle.kts echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - $NEW_VERSION - name: Build with Gradle uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 From 04c008df86453158e921cdc978d310b2f98927ea Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 13:34:19 -0700 Subject: [PATCH 12/26] uh --- .github/workflows/prerelease.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 2c85dea..7046afd 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -23,6 +23,7 @@ jobs: export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} cat build.gradle.kts | sed "s/$OLD_VERION/$NEW_VERSION/" > build.gradle.kts echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - $NEW_VERSION + cat build.gradle.kts - name: Build with Gradle uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 with: From 2c6dbb4c350214c06b6c8051076fb3f73332c6fe Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 13:44:59 -0700 Subject: [PATCH 13/26] whoops lol --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 7046afd..8e33105 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -21,7 +21,7 @@ jobs: run: | export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} - cat build.gradle.kts | sed "s/$OLD_VERION/$NEW_VERSION/" > build.gradle.kts + cat build.gradle.kts | sed "s/$OLD_VERSION/$NEW_VERSION/" > build.gradle.kts echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - $NEW_VERSION cat build.gradle.kts - name: Build with Gradle From f8e383836b7a512a3110e4f56394a3ebeb6bb79d Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 14:08:34 -0700 Subject: [PATCH 14/26] i love commit spam --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 8e33105..1a919fb 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -21,7 +21,7 @@ jobs: run: | export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} - cat build.gradle.kts | sed "s/$OLD_VERSION/$NEW_VERSION/" > build.gradle.kts + (cat build.gradle.kts | sed "s/$OLD_VERSION/$NEW_VERSION/") > build.gradle.kts echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - $NEW_VERSION cat build.gradle.kts - name: Build with Gradle From 6f7ce892dd2e2b62fd0fb8c28d3df612c6f3dded Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 14:17:21 -0700 Subject: [PATCH 15/26] ok might work this time --- .github/workflows/prerelease.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 1a919fb..aaa31ac 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -21,7 +21,9 @@ jobs: run: | export OLD_VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} - (cat build.gradle.kts | sed "s/$OLD_VERSION/$NEW_VERSION/") > build.gradle.kts + (cat build.gradle.kts | sed "s/$OLD_VERSION/$NEW_VERSION/") > temp.txt + mv temp.txt build.gradle.kts + rm temp.txt echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - $NEW_VERSION cat build.gradle.kts - name: Build with Gradle From 33d0d6c9f3b174fd0763bdf24e87f1e298e3c885 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 14:18:02 -0700 Subject: [PATCH 16/26] whoops --- .github/workflows/prerelease.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index aaa31ac..b1e0b4b 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -23,7 +23,6 @@ jobs: export NEW_VERSION=$OLD_VERSION-b${{github.run_number}} (cat build.gradle.kts | sed "s/$OLD_VERSION/$NEW_VERSION/") > temp.txt mv temp.txt build.gradle.kts - rm temp.txt echo Version number is now $(cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}') - $NEW_VERSION cat build.gradle.kts - name: Build with Gradle From 23b8d669e74af2fc09bf2babd100c311eda43c5a Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 14:20:40 -0700 Subject: [PATCH 17/26] ok, good chance this will work --- .github/workflows/prerelease.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index b1e0b4b..354f599 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -43,5 +43,6 @@ jobs: env: POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }} run: | - file free/build/libs/ajQueue-$NEW_VERSION.jar - curl -F "file=@free/build/libs/ajQueue-$NEW_VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$NEW_VERSION" -F title="Pre-release v$NEW_VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" + export $VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` + file free/build/libs/ajQueue-$VERSION.jar + curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" From a4373124639b61edde87f3bf5191490626af9bd4 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 14:23:01 -0700 Subject: [PATCH 18/26] lol whoops --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 354f599..f5107ff 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -43,6 +43,6 @@ jobs: env: POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }} run: | - export $VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` + export VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` file free/build/libs/ajQueue-$VERSION.jar curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" From 9289cc367ee97a74c5e71213f7a211e5acfbd7fc Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 14:31:56 -0700 Subject: [PATCH 19/26] Change release message --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index f5107ff..246f5cf 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -45,4 +45,4 @@ jobs: run: | export VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` file free/build/libs/ajQueue-$VERSION.jar - curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\n${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" + curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!%0A%0AChange since previous build:%0A${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" From 986488c22c2a0aac277b915d6dad07707c980d80 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 14:34:14 -0700 Subject: [PATCH 20/26] Maybe this will fix the newlines --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 246f5cf..9205b3d 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -45,4 +45,4 @@ jobs: run: | export VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` file free/build/libs/ajQueue-$VERSION.jar - curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!%0A%0AChange since previous build:%0A${{ github.event.head_commit.message }}" "https://api.polymart.org/v1/postUpdate" + curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title=$'Pre-release v$VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\nChange since previous build:\n${{ github.event.head_commit.message }}' "https://api.polymart.org/v1/postUpdate" From fffbce421c151ef45452bbd6377727cb3210903d Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 14:36:00 -0700 Subject: [PATCH 21/26] Whoops lol --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 9205b3d..09fc1d9 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -45,4 +45,4 @@ jobs: run: | export VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` file free/build/libs/ajQueue-$VERSION.jar - curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title=$'Pre-release v$VERSION" -F beta=1 -F message="Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\nChange since previous build:\n${{ github.event.head_commit.message }}' "https://api.polymart.org/v1/postUpdate" + curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message=$'Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\nChange since previous build:\n${{ github.event.head_commit.message }}' "https://api.polymart.org/v1/postUpdate" From ff1af2642b3b95198fddd1b374df752ed06886ea Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 15:41:59 -0700 Subject: [PATCH 22/26] Change base command to queue instead of move --- spigot/src/main/resources/plugin.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spigot/src/main/resources/plugin.yml b/spigot/src/main/resources/plugin.yml index afc875e..4b70578 100644 --- a/spigot/src/main/resources/plugin.yml +++ b/spigot/src/main/resources/plugin.yml @@ -5,8 +5,8 @@ author: ajgeiss0702 name: ajQueue softdepend: [PlaceholderAPI] commands: - move: - aliases: [server, queue, joinq, joinqueue] + queue: + aliases: [server, move, joinq, joinqueue] description: Queue for a server leavequeue: aliases: [leaveq] From b14aa5e03a28745fe791772f45272367802269cc Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 15:56:27 -0700 Subject: [PATCH 23/26] Add compare link --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 09fc1d9..3211262 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -45,4 +45,4 @@ jobs: run: | export VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` file free/build/libs/ajQueue-$VERSION.jar - curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message=$'Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\nChange since previous build:\n${{ github.event.head_commit.message }}' "https://api.polymart.org/v1/postUpdate" + curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message=$'Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\nChange since previous build:\n${{ github.event.head_commit.message }}' "https://api.polymart.org/v1/postUpdate" From 25c8a117b1a1781ff330b0802e08bf8f5e4389b4 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 17:08:49 -0700 Subject: [PATCH 24/26] Fix compare link --- .github/workflows/prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 3211262..2c525da 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -45,4 +45,4 @@ jobs: run: | export VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` file free/build/libs/ajQueue-$VERSION.jar - curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message=$'Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\nChange since previous build:\n${{ github.event.head_commit.message }}' "https://api.polymart.org/v1/postUpdate" + curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="Pre-release v$VERSION" -F beta=1 -F message=$'Note: This is a (most likely) un-tested build. It is not guarenteed to work!\n\nChange since previous build:\n[url=${{ github.event.compare }}"]${{ github.event.head_commit.message }}[/url]' "https://api.polymart.org/v1/postUpdate" From 3048b51027fa2e23d52260b4330eda0c2ea136ce Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Fri, 5 Aug 2022 18:08:47 -0700 Subject: [PATCH 25/26] 2.2.9 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9f99f79..4cd58f0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,7 @@ repositories { } allprojects { - version = "2.2.8" + version = "2.2.9" group = "us.ajg0702" plugins.apply("java") From f10026a4c19e7e475fcb1b9f7bcb715c58428243 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Sat, 6 Aug 2022 13:47:19 -0700 Subject: [PATCH 26/26] automatic polymart release --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ee2c511 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: Deploy Release to Polymart + +on: + push: + branches: + - master + + +jobs: + build: + runs-on: ubuntu-latest + environment: polymart_deploy + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 + with: + arguments: :free:shadowJar :premium:shadowJar + - name: Upload build files artifact + uses: actions/upload-artifact@v2.3.1 + with: + # Artifact name + name: build-files + # A file, directory or wildcard pattern that describes what to upload + path: '*/build/*' + # The desired behavior if no files are found using the provided path. + if-no-files-found: error + retention-days: 2 + - name: Download changelogs + run: | + curl "https://ajg0702.us/pl/updater/changelogs.php?project=${{ github.repository }}" > changelogs.bb + - name: Deploy to Polymart + env: + POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }} + run: | + export VERSION=`cat build.gradle.kts | grep "version " | awk -F'"' '{print $2}'` + file free/build/libs/ajQueue-$VERSION.jar + curl -F "file=@free/build/libs/ajQueue-$VERSION.jar" -F api_key=$POLYMART_TOKEN -F resource_id="2535" -F version="$VERSION" -F title="v$VERSION" -F message="$(cat changelogs.bb)" "https://api.polymart.org/v1/postUpdate"