Merge pull request #4833 from AuxXxilium/dev

build: update
This commit is contained in:
AuxXxilium 2024-11-22 16:58:14 +01:00 committed by GitHub
commit 6d65b418d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 39 additions and 56 deletions

View File

@ -57,7 +57,7 @@ jobs:
# Get extractor, LKM, Addons, Modules, Theme and Configs
- name: Get Buildroot
run: |
. scripts/func.sh
. scripts/func.sh "${{ secrets.BUILD_TOKEN }}"
echo "Get Dependencies"
getAddons "files/p3/addons"

View File

@ -83,7 +83,7 @@ jobs:
# Get extractor, LKM, Addons, Modules, Theme and Configs
- name: Get Dependencies for all Image
run: |
. scripts/func.sh
. scripts/func.sh "${{ secrets.BUILD_TOKEN }}"
echo "Get Dependencies"
getAddons "files/p3/addons"

View File

@ -6,30 +6,7 @@
# See /LICENSE for more information.
#
# Get latest Arc
# $1 path
function getArcSystem() {
echo "Getting ArcSystem begin"
local DEST_PATH="${1}"
local RELEASE="${2}"
local CACHE_FILE="/tmp/system.zip"
rm -f "${CACHE_FILE}"
if [ "${RELEASE}" = "dev" ]; then
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-system/releases" | jq -r ".[].tag_name" | grep "dev" | sort -rV | head -1)"
else
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-system/releases" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1)"
fi
if curl -skL "https://github.com/AuxXxilium/arc-system/releases/download/${TAG}/system-${TAG}.zip" -o "${CACHE_FILE}"; then
# Unzip LKMs
mkdir -p "${DEST_PATH}"
unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"
rm -f "${CACHE_FILE}"
echo "Getting ArcSystem end - ${TAG}"
else
echo "Failed to get ArcSystem"
exit 1
fi
}
[ -n "${1}" ] && export TOKEN="${1}"
# Get latest LKMs
# $1 path
@ -198,25 +175,28 @@ function getBuildrootx() {
echo "Getting Buildroot-X begin"
local DEST_PATH="${1}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-buildroot-x/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-x/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
export BRXTAG="${TAG}"
[ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}"
echo "Getting Kernel"
rm -f "${DEST_PATH}/bzImage-arc"
if curl -skL "https://github.com/AuxXxilium/arc-buildroot-x/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc"; then
rm -f "${DEST_PATH}/initrd-arc"
while true; do
if curl -skL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://github.com/AuxXxilium/arc-buildroot-x/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc"; then
echo "Kernel: ${TAG}"
else
echo "Failed to get Kernel"
exit 1
break && exit 1
fi
echo "Getting Ramdisk"
rm -f "${DEST_PATH}/initrd-arc"
if curl -skL "https://github.com/AuxXxilium/arc-buildroot-x/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc"; then
if curl -skL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://github.com/AuxXxilium/arc-buildroot-x/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc"; then
echo "Ramdisk: ${TAG}"
else
echo "Failed to get Ramdisk"
exit 1
break && exit 1
fi
[ -f "${DEST_PATH}/bzImage-arc" ] && [ -f "${DEST_PATH}/initrd-arc" ] && break
done <<<$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-x/releases" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Buildroot-X
@ -225,25 +205,28 @@ function getBuildroots() {
echo "Getting Buildroot-S begin"
local DEST_PATH="${1}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-buildroot-s/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
export BRSTAG="${TAG}"
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-s/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
export BRXTAG="${TAG}"
[ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}"
echo "Getting Kernel"
rm -f "${DEST_PATH}/bzImage-arc"
if curl -skL "https://github.com/AuxXxilium/arc-buildroot-s/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc"; then
rm -f "${DEST_PATH}/initrd-arc"
while true; do
if curl -skL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://github.com/AuxXxilium/arc-buildroot-s/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc"; then
echo "Kernel: ${TAG}"
else
echo "Failed to get Kernel"
exit 1
break && exit 1
fi
echo "Getting Ramdisk"
rm -f "${DEST_PATH}/initrd-arc"
if curl -skL "https://github.com/AuxXxilium/arc-buildroot-s/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc"; then
if curl -skL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://github.com/AuxXxilium/arc-buildroot-s/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc"; then
echo "Ramdisk: ${TAG}"
else
echo "Failed to get Ramdisk"
exit 1
break && exit 1
fi
[ -f "${DEST_PATH}/bzImage-arc" ] && [ -f "${DEST_PATH}/initrd-arc" ] && break
done <<<$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-s/releases" | jq -r '.assets[] | "\(.id) \(.name)"')
}
# Get latest Offline