Compare commits
10 Commits
1.20.4-650
...
1.20.4-b9c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9c7ba203c | ||
|
|
7e3a5323eb | ||
|
|
69b48a26fe | ||
|
|
e75615d0f0 | ||
|
|
2d36e9dadd | ||
|
|
8e5b748036 | ||
|
|
8def6164e9 | ||
|
|
6fd01ff5af | ||
|
|
0811e8d76d | ||
|
|
850c60d04c |
63
.github/workflows/build_1_20_4.yml_dis
vendored
Normal file
63
.github/workflows/build_1_20_4.yml_dis
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
||||
|
||||
name: LuminolCI - Ver/1.20.4
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/1.20.4" ]
|
||||
pull_request:
|
||||
branches: [ "ver/1.20.4" ]
|
||||
|
||||
permissions: write-all
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up git
|
||||
run: git config --global user.email "noreply@github.com" && git config --global user.name "ci"
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Make gradlew executable
|
||||
run: chmod 777 ./gradlew
|
||||
- name: Setup project
|
||||
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
|
||||
with:
|
||||
arguments: applyPatches
|
||||
- name: Build project to paperclip jar
|
||||
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
|
||||
with:
|
||||
arguments: createReobfBundlerJar createReobfPaperclipJar
|
||||
- name: Capture build artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Artifacts
|
||||
path: build/libs/
|
||||
- name: Publish All
|
||||
run: |
|
||||
echo "GITHUB_USERNAME=LuminolCI" >> $GITHUB_ENV
|
||||
export GITHUB_USERNAME=LuminolCI
|
||||
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
./gradlew publish -PpublishDevBundle=true
|
||||
- name: Rename jar file
|
||||
run: mv build/libs/luminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar
|
||||
- name: Release Artifacts
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
release_name: "Luminol MC1.20.4 - ${{ github.event.repository.updated_at}}"
|
||||
tag: "1.20.4-${{ github.run_id }}"
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
file: "build/libs/luminol-1.20.4-paperclip.jar"
|
||||
file_glob: true
|
||||
prerelease: true
|
||||
@@ -1,66 +1,73 @@
|
||||
name: Luminol CI - ver/1.20.4
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/1.20.4" ]
|
||||
pull_request:
|
||||
branches: [ "ver/1.20.4" ]
|
||||
|
||||
permissions: write-all
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
environment: default
|
||||
steps:
|
||||
- name: Checkout Git Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/actions/wrapper-validation@v3
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
gradle-version: 8.4
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
- name: Configure Git User Details
|
||||
run: git config --global user.email "ci@luminolmc.com" && git config --global user.name "LuminolMC CI"
|
||||
- name: Apply Patches
|
||||
run: gradle applyPatches
|
||||
- name: CreateJar
|
||||
run: gradle createReobfBundlerJar createReobfPaperclipJar
|
||||
- name: SetENV
|
||||
run: sh scripts/SetENV.sh
|
||||
- name: Upload Artifact
|
||||
uses: "actions/upload-artifact@v4"
|
||||
with:
|
||||
name: "${{ env.project_id_b }} CI Artifacts"
|
||||
path: "build/libs/*.jar"
|
||||
- name: Create Release
|
||||
if: "!contains(github.event.commits[0].message, '[release skip]')"
|
||||
uses: ncipollo/release-action@v1.14.0
|
||||
with:
|
||||
tag: ${{ env.tag }}
|
||||
name: ${{ env.project_id_b }} ${{ env.mcversion }} - ${{ env.commit_id }}
|
||||
body: |
|
||||
📦Version: `${{ env.mcversion }}` | Commit ${{ env.commit_id }} [](https://github.com/LuminolMC/${{ env.project_id }}/download/${{ env.tag }}/${{ env.jar }})
|
||||
This release is automatically compiled by GitHub Actions
|
||||
### Commit Message
|
||||
${{ env.commit_msg }}
|
||||
artifacts: |
|
||||
${{ env.jar_dir }}
|
||||
build/libs/${{ env.project_id }}-${{ env.mcversion }}-bundler.jar
|
||||
generateReleaseNotes: true
|
||||
prerelease: ${{ env.pre }}
|
||||
makeLatest: ${{ env.make_latest }}
|
||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
- name: Push to API
|
||||
if: "!contains(github.event.commits[0].message, '[release skip]')"
|
||||
env:
|
||||
secret_v2: ${{ secrets.API_KEY }}
|
||||
tag: ${{ env.tag }}
|
||||
project_id: ${{ env.project_id }}
|
||||
name: Luminol CI v2 - ver/1.20.4
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "ver/1.20.4" ]
|
||||
pull_request:
|
||||
branches: [ "ver/1.20.4" ]
|
||||
|
||||
permissions: write-all
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
environment: default
|
||||
steps:
|
||||
- name: Checkout Git Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/actions/wrapper-validation@v3
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
- name: Configure Git User Details
|
||||
run: git config --global user.email "ci@luminolmc.com" && git config --global user.name "LuminolMC CI"
|
||||
- name: Apply Patches
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
arguments: applyPatches
|
||||
- name: CreateJar
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
arguments: createReobfBundlerJar createReobfPaperclipJar
|
||||
- name: SetENV
|
||||
run: |
|
||||
echo "project_id=luminol" >> $GITHUB_ENV
|
||||
echo "project_id_b=Luminol" >> $GITHUB_ENV
|
||||
sh scripts/SetENV.sh
|
||||
echo "${{ env.tag }}"
|
||||
- name: Upload Artifact
|
||||
uses: "actions/upload-artifact@v4"
|
||||
with:
|
||||
name: "${{ env.project_id_b }} CI Artifacts"
|
||||
path: "build/libs/*.jar"
|
||||
- name: Create Release
|
||||
if: "!contains(github.event.commits[0].message, '[release skip]')"
|
||||
uses: ncipollo/release-action@v1.14.0
|
||||
with:
|
||||
tag: ${{ env.tag }}
|
||||
name: Luminol ${{ env.mcversion }} - ${{ env.commitid }}
|
||||
body: |
|
||||
====
|
||||
📦Version: `${{ env.mcversion }}` | Commit ${{ env.commit_id }} [](https://github.com/LuminolMC/${{ env.project_id }}/download/${{ env.tag }}/${{ env.jar }})
|
||||
This release is automatically compiled by GitHub Actions
|
||||
### Commit Message
|
||||
${{ env.commit_msg }}
|
||||
artifacts: |
|
||||
${{ env.jar_dir }}
|
||||
build/libs/${{ env.project_id }}-${{ env.mcversion }}-bundler.jar
|
||||
generateReleaseNotes: true
|
||||
prerelease: ${{ env.pre }}
|
||||
makeLatest: ${{ env.make_latest }}
|
||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
- name: Push to API
|
||||
if: "!contains(github.event.commits[0].message, '[release skip]')"
|
||||
env:
|
||||
secret_v2: ${{ secrets.API_KEY }}
|
||||
tag: ${{ env.tag }}
|
||||
project_id: ${{ env.project_id }}
|
||||
run: sh scripts/PushToAPI.sh
|
||||
@@ -8,6 +8,6 @@ org.gradle.parallel = true
|
||||
org.gradle.vfs.watch = false
|
||||
org.gradle.jvmargs = -Xmx3G
|
||||
|
||||
mcVersion = 1.20.4
|
||||
GroupMCV = 1.20
|
||||
preVersion = false
|
||||
mcVersion=1.20.4
|
||||
GroupMCV=1.20
|
||||
preVersion=false
|
||||
@@ -93,10 +93,10 @@ index 0000000000000000000000000000000000000000..dcfbabf54b19a4c29d5c95830242c5c2
|
||||
+}
|
||||
diff --git a/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java b/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..7e551a5fb7db6a0aa4f60b15587be2b716c54000
|
||||
index 0000000000000000000000000000000000000000..dc5a5f42c9ca7a50295c18424722568a3ad33fa5
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFile.java
|
||||
@@ -0,0 +1,341 @@
|
||||
@@ -0,0 +1,324 @@
|
||||
+package dev.kaiijumc.kaiiju.region;
|
||||
+
|
||||
+import com.github.luben.zstd.ZstdInputStream;
|
||||
@@ -120,7 +120,6 @@ index 0000000000000000000000000000000000000000..7e551a5fb7db6a0aa4f60b15587be2b7
|
||||
+import java.util.Arrays;
|
||||
+import java.util.List;
|
||||
+import java.util.concurrent.atomic.AtomicBoolean;
|
||||
+import java.util.concurrent.atomic.AtomicInteger;
|
||||
+import java.util.concurrent.locks.ReentrantLock;
|
||||
+
|
||||
+public class LinearRegionFile implements AbstractRegionFile, AutoCloseable {
|
||||
@@ -130,7 +129,7 @@ index 0000000000000000000000000000000000000000..7e551a5fb7db6a0aa4f60b15587be2b7
|
||||
+ private static final int FOOTER_SIZE = 8;
|
||||
+ private static final Logger LOGGER = LogUtils.getLogger();
|
||||
+ private static final List<Byte> SUPPORTED_VERSIONS = Arrays.asList((byte) 1, (byte) 2);
|
||||
+ public static final LinearRegionFileFlusher linearRegionFileFlusher = new LinearRegionFileFlusher();
|
||||
+ private static final LinearRegionFileFlusher linearRegionFileFlusher = new LinearRegionFileFlusher();
|
||||
+
|
||||
+ private final byte[][] buffer = new byte[1024][];
|
||||
+ private final int[] bufferUncompressedSize = new int[1024];
|
||||
@@ -148,9 +147,6 @@ index 0000000000000000000000000000000000000000..7e551a5fb7db6a0aa4f60b15587be2b7
|
||||
+ public boolean closed = false;
|
||||
+ public Path path;
|
||||
+
|
||||
+ public volatile boolean savingScheduled = true;
|
||||
+ public final AtomicInteger dirtyChunkCount = new AtomicInteger(0);
|
||||
+
|
||||
+
|
||||
+ public LinearRegionFile(Path file, int compression) throws IOException {
|
||||
+ this.path = file;
|
||||
@@ -229,18 +225,12 @@ index 0000000000000000000000000000000000000000..7e551a5fb7db6a0aa4f60b15587be2b7
|
||||
+ }
|
||||
+
|
||||
+ public void flush() throws IOException {
|
||||
+ if (getAndResetSaveMarker()) {
|
||||
+ this.savingScheduled = false; //cancel async saving
|
||||
+ flushWrapper(); // sync
|
||||
+ }
|
||||
+ if (getAndResetSaveMarker()) flushWrapper(); // sync
|
||||
+ }
|
||||
+
|
||||
+ private void markToSave() {
|
||||
+ markedToSave.set(true);
|
||||
+ }
|
||||
+
|
||||
+ private void signalToSave(){
|
||||
+ linearRegionFileFlusher.scheduleSave(this);
|
||||
+ markedToSave.set(true);
|
||||
+ }
|
||||
+
|
||||
+ public boolean getAndResetSaveMarker() {
|
||||
@@ -260,8 +250,6 @@ index 0000000000000000000000000000000000000000..7e551a5fb7db6a0aa4f60b15587be2b7
|
||||
+ save();
|
||||
+ } catch (IOException e) {
|
||||
+ LOGGER.error("Failed to flush region file " + path.toAbsolutePath(), e);
|
||||
+ }finally {
|
||||
+ this.dirtyChunkCount.set(0); //Reset dirty chunk count
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@@ -345,11 +333,8 @@ index 0000000000000000000000000000000000000000..7e551a5fb7db6a0aa4f60b15587be2b7
|
||||
+ this.bufferUncompressedSize[getChunkIndex(pos.x, pos.z)] = uncompressedSize;
|
||||
+ } catch (IOException e) {
|
||||
+ LOGGER.error("Chunk write IOException " + e + " " + this.path);
|
||||
+ }finally {
|
||||
+ this.dirtyChunkCount.getAndIncrement();
|
||||
+ }
|
||||
+ markToSave();
|
||||
+ signalToSave();
|
||||
+ }
|
||||
+
|
||||
+ public DataOutputStream getChunkDataOutputStream(ChunkPos pos) {
|
||||
@@ -401,9 +386,7 @@ index 0000000000000000000000000000000000000000..7e551a5fb7db6a0aa4f60b15587be2b7
|
||||
+ this.buffer[i] = null;
|
||||
+ this.bufferUncompressedSize[i] = 0;
|
||||
+ this.chunkTimestamps[i] = getTimestamp();
|
||||
+ this.dirtyChunkCount.getAndIncrement();
|
||||
+ markToSave();
|
||||
+ signalToSave();
|
||||
+ }
|
||||
+
|
||||
+ public boolean hasChunk(ChunkPos pos) {
|
||||
@@ -440,19 +423,22 @@ index 0000000000000000000000000000000000000000..7e551a5fb7db6a0aa4f60b15587be2b7
|
||||
+}
|
||||
diff --git a/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFileFlusher.java b/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFileFlusher.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..dea4dffd67ee9881a224acf41367c6845acec832
|
||||
index 0000000000000000000000000000000000000000..65435eb666b2e1cabffc145e016faa5e3b373464
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/dev/kaiijumc/kaiiju/region/LinearRegionFileFlusher.java
|
||||
@@ -0,0 +1,63 @@
|
||||
@@ -0,0 +1,57 @@
|
||||
+package dev.kaiijumc.kaiiju.region;
|
||||
+
|
||||
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
+
|
||||
+import java.util.Set;
|
||||
+import java.util.concurrent.*;
|
||||
+import org.bukkit.Bukkit;
|
||||
+
|
||||
+public class LinearRegionFileFlusher {
|
||||
+ private final ExecutorService ioExecutor = Executors.newFixedThreadPool(
|
||||
+ private final Set<LinearRegionFile> pendingSaving = ConcurrentHashMap.newKeySet();
|
||||
+
|
||||
+ private final ExecutorService executor = Executors.newFixedThreadPool(
|
||||
+ me.earthme.luminol.config.modules.misc.RegionFormatConfig.linearFlushThreads,
|
||||
+ new ThreadFactoryBuilder()
|
||||
+ .setNameFormat("linear-flusher-%d")
|
||||
@@ -462,7 +448,7 @@ index 0000000000000000000000000000000000000000..dea4dffd67ee9881a224acf41367c684
|
||||
+ private final Executor delayedFlusher = CompletableFuture.delayedExecutor(
|
||||
+ me.earthme.luminol.config.modules.misc.RegionFormatConfig.linearFlushFrequency,
|
||||
+ TimeUnit.SECONDS,
|
||||
+ ioExecutor
|
||||
+ executor
|
||||
+ );
|
||||
+
|
||||
+ public LinearRegionFileFlusher() {
|
||||
@@ -470,37 +456,28 @@ index 0000000000000000000000000000000000000000..dea4dffd67ee9881a224acf41367c684
|
||||
+ }
|
||||
+
|
||||
+ public void scheduleSave(LinearRegionFile regionFile) {
|
||||
+ if (regionFile.dirtyChunkCount.get() > me.earthme.luminol.config.modules.misc.RegionFormatConfig.flushImmediatelyIfDirtyChunkHigherThan){
|
||||
+ this.scheduleSaveInternal(regionFile,this.ioExecutor);
|
||||
+ if (this.pendingSaving.contains(regionFile) || !regionFile.isMarkedToSave()){
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ this.scheduleSaveInternal(regionFile,this.delayedFlusher);
|
||||
+ }
|
||||
+
|
||||
+ private void scheduleSaveInternal(LinearRegionFile regionFile,Executor scheduler){
|
||||
+ if (!regionFile.savingScheduled || !regionFile.isMarkedToSave()){
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ regionFile.savingScheduled = true;
|
||||
+ scheduler.execute(()->{
|
||||
+ this.pendingSaving.add(regionFile);
|
||||
+ this.delayedFlusher.execute(()->{
|
||||
+ try {
|
||||
+ if (!regionFile.closed && regionFile.isMarkedToSave()){
|
||||
+ regionFile.flushWrapper();
|
||||
+ }
|
||||
+ }finally {
|
||||
+ regionFile.resetSaveMarker();
|
||||
+ regionFile.savingScheduled = false;
|
||||
+ this.pendingSaving.remove(regionFile);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ public void shutdown() {
|
||||
+ this.ioExecutor.shutdown();
|
||||
+ this.executor.shutdown();
|
||||
+ for (;;) {
|
||||
+ try {
|
||||
+ if (this.ioExecutor.awaitTermination(5_00,TimeUnit.MILLISECONDS)) break;
|
||||
+ if (this.executor.awaitTermination(5_00,TimeUnit.MILLISECONDS)) break;
|
||||
+ } catch (InterruptedException e) {
|
||||
+ e.printStackTrace();
|
||||
+ }
|
||||
@@ -596,18 +573,6 @@ index 2934f0cf0ef09c84739312b00186c2ef0019a165..b46acbc078f3d3bfb0f3ede3f1cc172f
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/threadedregions/RegionShutdownThread.java b/src/main/java/io/papermc/paper/threadedregions/RegionShutdownThread.java
|
||||
index 3f3fd8b1881106f893ffb677272e50d77cbb6626..338dfc1c87ac82df80b3b87148deb791110ce3cc 100644
|
||||
--- a/src/main/java/io/papermc/paper/threadedregions/RegionShutdownThread.java
|
||||
+++ b/src/main/java/io/papermc/paper/threadedregions/RegionShutdownThread.java
|
||||
@@ -164,6 +164,7 @@ public final class RegionShutdownThread extends TickThread {
|
||||
|
||||
this.saveLevelData(world);
|
||||
}
|
||||
+ dev.kaiijumc.kaiiju.region.LinearRegionFile.linearRegionFileFlusher.shutdown(); //Luminol - Kaiiju linear format fixes
|
||||
// moved from stop part 1
|
||||
// we need this to be after saving level data, as that will complete any teleportations the player is in
|
||||
LOGGER.info("Saving players");
|
||||
diff --git a/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java b/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
||||
index 9017907c0ec67a37a506f09b7e4499cef7885279..8b9ffcaab5d71660291d1c0454d2abd969d8c6ae 100644
|
||||
--- a/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
||||
@@ -629,10 +594,10 @@ index 9017907c0ec67a37a506f09b7e4499cef7885279..8b9ffcaab5d71660291d1c0454d2abd9
|
||||
|
||||
diff --git a/src/main/java/me/earthme/luminol/config/modules/misc/RegionFormatConfig.java b/src/main/java/me/earthme/luminol/config/modules/misc/RegionFormatConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ab1c3e0276bbdbb32fd4155f7c596f3172c7f351
|
||||
index 0000000000000000000000000000000000000000..5d594b606178bd26180caad49de17c0e67e89747
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/modules/misc/RegionFormatConfig.java
|
||||
@@ -0,0 +1,60 @@
|
||||
@@ -0,0 +1,58 @@
|
||||
+package me.earthme.luminol.config.modules.misc;
|
||||
+
|
||||
+import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||
@@ -655,8 +620,6 @@ index 0000000000000000000000000000000000000000..ab1c3e0276bbdbb32fd4155f7c596f31
|
||||
+ @HotReloadUnsupported
|
||||
+ @ConfigInfo(baseName = "linear_flush_frequency")
|
||||
+ public static int linearFlushFrequency = 10;
|
||||
+ @ConfigInfo(baseName = "flush_immediately_if_queued_higher_than")
|
||||
+ public static int flushImmediatelyIfDirtyChunkHigherThan = 5;
|
||||
+
|
||||
+ @Override
|
||||
+ public EnumConfigCategory getCategory() {
|
||||
|
||||
@@ -2,7 +2,7 @@ sha256() {
|
||||
sha256sum $1 | awk '{print $1}'
|
||||
}
|
||||
prop() {
|
||||
grep "^[[:space:]]*${1}" gradle.properties | cut -d'=' -f2 | sed 's/^[[:space:]]*//; s/\r//'
|
||||
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
|
||||
}
|
||||
|
||||
mcversion_group=$(prop GroupMCV)
|
||||
@@ -22,25 +22,4 @@ jar_name="$pro_id_mcv-paperclip.jar"
|
||||
ctime=$(date -u +"%s")"000"
|
||||
|
||||
# v2
|
||||
json=$(printf "{\\\"channel\\\":\\\"%s\\\", \\\"jar_name\\\":\\\"%s\\\", \\\"sha256\\\":\\\"%s\\\", \\\"tag\\\":\\\"%s\\\", \\\"time\\\":\\\"%s\\\", \\\"changes\\\":\\\"%s\\\"}" \
|
||||
"$channel" "$jar_name" "$jar_sha256" "$tag" "$ctime" "$changes")
|
||||
echo "[DEBUG] $json"
|
||||
echo "[DEBUG] $changes"
|
||||
echo "[DEBUG] curl --location --request POST \"https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit\" \
|
||||
-H \"Content-Type: application/x-www-form-urlencoded\" \
|
||||
-H \"Authorization: $secret_v2\" \
|
||||
--data-urlencode \"channel=$channel\" \
|
||||
--data-urlencode \"jar_name=$jar_name\" \
|
||||
--data-urlencode \"sha256=$jar_sha256\" \
|
||||
--data-urlencode \"release_tag=$tag\" \
|
||||
--data-urlencode \"time=$ctime\" \
|
||||
--data-urlencode \"changes=$changes\""
|
||||
curl -L --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" \
|
||||
-H "Content-Type: application/x-www-form-urlencoded" \
|
||||
-H "Authorization: $secret_v2" \
|
||||
--data-urlencode "channel=$channel" \
|
||||
--data-urlencode "jar_name=$jar_name" \
|
||||
--data-urlencode "sha256=$jar_sha256" \
|
||||
--data-urlencode "release_tag=$tag" \
|
||||
--data-urlencode "time=$ctime" \
|
||||
--data-urlencode "changes=$changes"
|
||||
curl -L --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: $secret_v2" --data-urlencode "channel=$channel" --data-urlencode "jar_name=$jar_name" --data-urlencode "sha256=$jar_sha256" --data-urlencode "release_tag=$tag" --data-urlencode "time=$ctime" --data-urlencode "changes=$changes"
|
||||
@@ -1,10 +1,7 @@
|
||||
prop() {
|
||||
grep "^[[:space:]]*${1}" gradle.properties | cut -d'=' -f2 | sed 's/^[[:space:]]*//; s/\r//'
|
||||
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
|
||||
}
|
||||
|
||||
project_id="luminol"
|
||||
project_id_b="Luminol"
|
||||
|
||||
commitid=$(git log --pretty='%h' -1)
|
||||
mcversion=$(prop mcVersion)
|
||||
grdversion=$(prop version)
|
||||
@@ -20,7 +17,8 @@ mv build/libs/$project_id-bundler-$grdversion-reobf.jar build/libs/$project_id-$
|
||||
echo "project_id=$project_id" >> $GITHUB_ENV
|
||||
echo "project_id_b=$project_id_b" >> $GITHUB_ENV
|
||||
echo "commit_id=$commitid" >> $GITHUB_ENV
|
||||
echo "commit_msg=$(git log --pretty='> [%h] %s' -1)" >> $GITHUB_ENV
|
||||
echo "commit_msg=$(git log --pretty='> [%h] %s' -$number)" >> $GITHUB_ENV
|
||||
echo "$commit_msg"
|
||||
echo "mcversion=$mcversion" >> $GITHUB_ENV
|
||||
echo "pre=$preVersion" >> $GITHUB_ENV
|
||||
echo "tag=$release_tag" >> $GITHUB_ENV
|
||||
|
||||
Reference in New Issue
Block a user