1
0
mirror of https://github.com/rancher/os.git synced 2025-06-23 21:47:03 +00:00
os/scripts/package-iso
niusmallnan 7f4f270129 Update release scripts
1. also upload the artifacts to the github release page
2. add checksums for most artifacts
2019-02-21 13:15:30 +08:00

44 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
set -e
set -x
source $(dirname $0)/version
cd $(dirname $0)/..
ARTIFACTS=$(pwd)/dist/artifacts
CD=${BUILD}/cd
rm -rf ${CD}/
ISO=${ARTIFACTS}/$(echo ${DISTRIB_ID} | tr '[:upper:]' '[:lower:]').iso
mkdir -p ${CD}/boot/isolinux
mkdir -p ${CD}/rancheros
cp ${ARTIFACTS}/${INITRD} ${CD}/boot
# TODO: these move to os-kernel
pwd
ls dist/artifacts/vmlinuz-${KERNEL_VERSION}
cp ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ${CD}/boot/
#TODO cp ${ARTIFACTS}/linuxmods-${KERNEL_VERSION} ${CD}/boot/
# cfg files creation moved to package-installer
DIST=$(pwd)/dist
cp -r ${DIST}/boot/* ${CD}/boot/
cp /usr/lib/ISOLINUX/isolinux.bin ${CD}/boot/isolinux/
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux/
cp /usr/lib/syslinux/modules/bios/*.c32 ${CD}/boot/isolinux/
# add the installer image to the iso for non-network / dev/test
cp ${ARTIFACTS}/installer.tar ${CD}/rancheros/
cp ${ARTIFACTS}/Dockerfile.${ARCH} ${CD}/rancheros/
gzip ${CD}/rancheros/installer.tar
cd ${CD} && xorriso \
-as mkisofs \
-l -J -R -V "${DISTRIB_ID}" \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-o $ISO ${CD}
cd $(dirname $ISO)