mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-28 03:19:22 +00:00
[ci skip] Update scripts
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
prop() {
|
||||
grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
|
||||
}
|
||||
|
||||
latest_build=$(curl -s https://api.leavesmc.org/v2/projects/leaves/versions/$(prop mcVersion)/latestGroupBuildId)
|
||||
latest_build=$(curl -s -L "https://api.leavesmc.org/projects/leaves/versions/$(prop mcVersion)/latestGroupBuildId")
|
||||
|
||||
if [[ $latest_build =~ ^[0-9]+$ ]]; then
|
||||
echo "BUILD_NUMBER=$((latest_build + 1))" >> $GITHUB_ENV
|
||||
echo "BUILD_NUMBER=$((latest_build + 1))" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "Error: Received non-integer value from API: $latest_build"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user