Skip to content
Snippets Groups Projects
Commit a7af9e6f authored by chrissi^'s avatar chrissi^
Browse files

Renaming Files and extending BuildID


Signed-off-by: default avatarChrissi^ <chris@tinyhost.de>
parent 919ca739
Branches
Tags
No related merge requests found
builder.sh 100644 → 100755
#!/bin/bash
set -e
cd ../
# Setting environment
# ###################
ARCHITECTURES=( ar71xx-tiny ar71xx-generic ar71xx-nand brcm2708-bcm2708 brcm2708-bcm2709 mpc85xx-generic x86-64 x86-generic)
#ARCHITECTURES=( ar71xx-tiny )
BRANCH=stable
#BRANCH=stable
#BRANCH=unbranded_stable
#BRANCH=experimental
BRANCH=experimental
#BRANCH=beta
# prepare needed strings
GLUONVERSION=$(git describe --tags | cut -d "-" -f 1)
SITECOMMIT=$(cd site; git log -1 --format="%H")
ARCHSTRING=multiarch
if [ "${#ARCHITECTURES[@]}" -eq "1" ]; then
ARCHSTRING=${ARCHITECTURES[0]}
fi
RELEASENAME=${GLUONVERSION}-$(date '+%Y%m%d%H%M')-${BRANCH}
RELEASETAG=ffbs_${GLUONVERSION}_${BRANCH}_${ARCHSTRING}_$(date '+%Y%m%d-%H%M')_${SITECOMMIT}
echo $RELEASETAG
#DEBUG="V=s"
DEBUG=""
......@@ -22,7 +35,7 @@ PRIO=2
# prepare site.conf from template
rm site/site.conf
cp site/site.in site/site.conf
cp site/site.in site/site.conf
sed -i -e "s/AUTOUPDATERBRANCH/$BRANCH/g" site/site.conf
# remove old images to make sure we only upload the new shiny stuff
......@@ -31,7 +44,6 @@ rm -rf output/images
# update toolchain to current release
make update
RELEASENAME=${GLUONVERSION}-$(date '+%Y%m%d')-${BRANCH}
for ARCHITECTURE in "${ARCHITECTURES[@]}"
do
......@@ -60,7 +72,9 @@ do
# Doing the Build
# ###############
make all GLUON_TARGET=$ARCHITECTURE $DEBUG -j16 GLUON_RELEASE=${RELEASENAME} GLUON_BRANCH=$BRANCH GLUON_PRIORITY=$PRIO
make all GLUON_TARGET=$ARCHITECTURE $DEBUG -j16 GLUON_RELEASE=${RELEASENAME} GLUON_BRANCH=$BRANCH GLUON_PRIORITY=$PRIO GLUON_ATH10K_MESH=ibss
echo Exiting with Code $?
done
# build manifests
......@@ -72,8 +86,19 @@ make manifest GLUON_BRANCH=$BRANCH GLUON_PRIORITY=${PRIO} GLUON_RELEASE=${RELEAS
# ###############
(cd site/; git show > ../output/images/commit.txt )
# shorten resulting image names for some TP-Link routers
(cd output/images/factory; for f in *; do mv "$f" "${f#gluon-ffbs-}"; done )
# rename files to match the ffbs-naming conventions
# TODO: give explanation or further resources
(cd output/images/factory; for f in *; do sudo mv "$f" "${f#gluon-ffbs-}"; done )
(cd output/images/factory; for f in *raspberry-pi.img.gz; do echo "${f/raspberry-pi.img.gz/raspberry-pi-1.img.gz}"; done )
(cd output/images/factory; for f in *x86-64*; do echo "${f/x86-64/x86-64-generic}"; done )
(cd output/images/factory; for f in *raspberry-pi.img.gz; do mv "$f" "${f/raspberry-pi.img.gz/raspberry-pi-1.img.gz}"; done )
(cd output/images/factory; for f in *x86-64.vmdk; do mv "$f" "${f/.vmdk/-vmware.vmdk}"; done )
(cd output/images/factory; for f in *x86-64.vdi; do mv "$f" "${f/.vdi/-virtualbox.vdi}"; done )
(cd output/images/factory; for f in *x86-64.img.gz; do mv "$f" "${f/.img.gz/-generic.img.gz}"; done )
(cd output/images/factory; for f in *x86-generic.vmdk; do mv "$f" "${f/x86-generic/x86-vmware}"; done )
(cd output/images/factory; for f in *x86-generic.vdi; do mv "$f" "${f/x86-generic/x86-virtualbox}"; done )
# rename image dir to represent build
mv output/images "output/${RELEASETAG}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment