-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.sh
executable file
·36 lines (30 loc) · 1.32 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -eu
DOCKER=${DOCKER:-docker}
mkdir -p iso
TAG="${EDITION}-${ALPINE_VERSION}"
source "edition/${EDITION}"
${DOCKER} run --rm \
--platform "linux/${ARCH_ALIAS}" \
-v "${PWD}/iso:/iso" \
-v "${PWD}/mkimg.lima.sh:/home/build/aports/scripts/mkimg.lima.sh:ro" \
-v "${PWD}/genapkovl-lima.sh:/home/build/aports/scripts/genapkovl-lima.sh:ro" \
-v "${PWD}/lima-init.sh:/home/build/lima-init.sh:ro" \
-v "${PWD}/lima-init.openrc:/home/build/lima-init.openrc:ro" \
-v "${PWD}/lima-init-local.openrc:/home/build/lima-init-local.openrc:ro" \
-v "${PWD}/lima-network.awk:/home/build/lima-network.awk:ro" \
-v "${PWD}/qemu-${QEMU_VERSION}-copying:/home/build/qemu-copying:ro" \
$(env | grep ^LIMA_ | xargs -n 1 printf -- '-e %s ') \
-e "LIMA_REPO_VERSION=${REPO_VERSION}" \
-e "LIMA_BUILD_ID=${BUILD_ID}" \
-e "LIMA_VARIANT_ID=${EDITION}" \
"mkimage:${ALPINE_VERSION}-${ARCH}" \
--tag "${TAG}" \
--outdir /iso \
--arch "${ARCH}" \
--repository "/home/build/packages/lima" \
--repository "http://dl-cdn.alpinelinux.org/alpine/${REPO_VERSION}/main" \
--repository "http://dl-cdn.alpinelinux.org/alpine/${REPO_VERSION}/community" \
--profile lima
ISO="alpine-lima-${EDITION}-${ALPINE_VERSION}-${ARCH}.iso"
cd iso && sha512sum "${ISO}" > "${ISO}.sha512sum"