mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2026-01-23 02:34:26 +00:00
only run the update logic on the rolling .x series, tag the versioned builds to display in menu
This commit is contained in:
parent
25171b8f87
commit
78eac80448
4 changed files with 22 additions and 9 deletions
|
|
@ -3,7 +3,7 @@
|
|||
### site configuration ###
|
||||
site_name: netboot.xyz
|
||||
boot_domain: boot.netboot.xyz
|
||||
boot_version: 1.04
|
||||
boot_version: "2.x"
|
||||
boot_timeout: 300000
|
||||
time_server: "0.pool.ntp.org"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J"
|
|||
set cls ${cls:string}
|
||||
:ignore_cls
|
||||
|
||||
{% if 'x' in boot_version %}
|
||||
:version_check
|
||||
set latest_version 1.04
|
||||
set latest_version {{ boot_version }}
|
||||
echo ${cls}
|
||||
iseq ${version} ${latest_version} && goto version_up2date ||
|
||||
echo
|
||||
|
|
@ -23,6 +24,7 @@ echo
|
|||
echo Attempting to chain to latest version...
|
||||
chain --autofree http://${boot_domain}/ipxe/${ipxe_disk} ||
|
||||
:version_up2date
|
||||
{% endif %}
|
||||
|
||||
isset ${arch} && goto skip_arch_detect ||
|
||||
cpuid --ext 29 && set arch x86_64 || set arch i386
|
||||
|
|
@ -113,4 +115,4 @@ goto main_menu
|
|||
|
||||
:custom-user
|
||||
chain custom/custom.ipxe
|
||||
goto main_menu
|
||||
goto main_menu
|
||||
|
|
|
|||
|
|
@ -1,19 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
TYPE=$1
|
||||
HARD_RELEASE="2.x"
|
||||
HARD_RC="2.x-RC"
|
||||
LIVE_URL="staging.boot.netboot.xyz"
|
||||
|
||||
# Set boot domain
|
||||
if [[ "${TYPE}" == "dev" ]]; then
|
||||
BOOT_DOMAIN="s3.amazonaws.com/${BUCKET_DEV}/${TRAVIS_COMMIT}"
|
||||
BOOT_VERSION="Development"
|
||||
elif [[ "${TYPE}" == "pr" ]]; then
|
||||
BOOT_DOMAIN="test.com"
|
||||
BOOT_VERSION="test"
|
||||
elif [[ "${TYPE}" == "rc" ]]; then
|
||||
BOOT_DOMAIN="staging.boot.netboot.xyz/$(cat version.txt)-RC"
|
||||
BOOT_VERSION=$(cat version.txt)-RC
|
||||
BOOT_DOMAIN="${LIVE_URL}/${BOOT_VERSION}"
|
||||
elif [[ "${TYPE}" == "release" ]]; then
|
||||
BOOT_DOMAIN="staging.boot.netboot.xyz/$(cat version.txt)"
|
||||
BOOT_VERSION=$(cat version.txt)
|
||||
BOOT_DOMAIN="${LIVE_URL}/${BOOT_VERSION}"
|
||||
fi
|
||||
sed -i \
|
||||
"/^#boot_version/c\boot_version: \"${BOOT_VERSION}\"" \
|
||||
user_overrides.yml
|
||||
sed -i \
|
||||
"/^#boot_domain/c\boot_domain: ${BOOT_DOMAIN}" \
|
||||
user_overrides.yml
|
||||
|
|
@ -39,14 +48,16 @@ if [[ "${TYPE}" == "release" ]] || [[ "${TYPE}" == "rc" ]]; then
|
|||
rm -Rf buildout/
|
||||
if [[ "${TYPE}" == "release" ]]; then
|
||||
sed -i \
|
||||
"/^boot_domain/c\boot_domain: staging.boot.netboot.xyz" \
|
||||
-e "/^boot_version/c\boot_version: \"${HARD_RELEASE}\"" \
|
||||
-e "/^boot_domain/c\boot_domain: ${LIVE_URL}" \
|
||||
user_overrides.yml
|
||||
docker build -t localbuild -f Dockerfile-build .
|
||||
docker run --rm -it -v $(pwd):/buildout localbuild
|
||||
fi
|
||||
if [[ "${TYPE}" == "rc" ]]; then
|
||||
sed -i \
|
||||
"/^boot_domain/c\boot_domain: staging.boot.netboot.xyz/rc" \
|
||||
-e "/^boot_version/c\boot_version: \"${HARD_RC}\"" \
|
||||
-e "/^boot_domain/c\boot_domain: ${LIVE_URL}/rc" \
|
||||
user_overrides.yml
|
||||
docker build -t localbuild -f Dockerfile-build .
|
||||
docker run --rm -it -v $(pwd):/buildout localbuild
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ generate_checksums: true
|
|||
#boot_domain: boot.mysitename.com
|
||||
|
||||
# set boot version
|
||||
#boot_version: 1.00
|
||||
#boot_version: "2.x"
|
||||
|
||||
#bootloader_tftp_enabled: false
|
||||
#bootloader_https_enabled: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue