Skip to content

Commit

Permalink
Limit to released ZBM sources (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
midzelis authored Oct 20, 2023
1 parent 6916ae2 commit 37ab415
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions zquickinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,24 @@ check() {
# This will build the main ZquickInit Builder OCI image
# shellcheck disable=SC2317
builder() {
echo "Creating ZQuickinit OCI build image..."
echo
check docker
check yq

local packages=()
# shellcheck disable=SC2016
mapfile -t -O "${#packages[@]}" packages < <($YG eval-all '. as $item ireduce ({}; . *+ $item) | (... | select(type == "!!seq")) |= unique | .xbps-packages[] | .. style=""' "$RECIPES_ROOT"/*/recipe.yaml)

ZBM_COMMIT_HASH=$(curl --silent https://api.github.com/repos/zbm-dev/zfsbootmenu/git/ref/heads/master | $YG .object.sha)
local latest_release_tag=''
latest_release_tag=$(curl --silent https://api.github.com/repos/zbm-dev/zfsbootmenu/releases/latest | $YG .tag_name)
ZBM_COMMIT_HASH=$(curl --silent "https://api.github.com/repos/zbm-dev/zfsbootmenu/git/ref/tags/${latest_release_tag}" | $YG .object.sha)
echo "ZQuickInit commit hash: $(git rev-parse HEAD)"
echo "ZBM latest release: $latest_release_tag"
echo "ZBM_COMMIT_HASH: $ZBM_COMMIT_HASH"
echo
echo "Building with Packages: ${packages[*]}"

echo
cmd=("$ENGINE" build .
-t "$RECIPE_BUILDER"
--build-arg KERNELS=linux6.2
Expand Down

0 comments on commit 37ab415

Please sign in to comment.