bump version to 0.8.5 experimental and some more build system updates

This commit is contained in:
Daniel Frank 2017-10-14 20:06:00 +02:00
parent ebddb7d986
commit 3f89fe6df3
5 changed files with 92 additions and 12 deletions

6
.gitignore vendored
View file

@ -1,5 +1 @@
*~ info
/site.conf
/site.mk
/modules
sites/

View file

@ -1,13 +1,21 @@
sites: sites/ffhh sites/ffhh-sued sites: clean info sites/ffhh sites/ffhh-sued
info: config/defaults.erb template/info.erb
erb -T- config/defaults.erb template/$@.erb >$@
.PHONY: clean
clean:
rm -rf sites
rm -f info
sites/%: config/%.erb sites/%: config/%.erb
mkdir -p $@ mkdir -p $@
cd $@ && $(MAKE) -f ../../Makefile site SITE=$(@F) cd $@ && $(MAKE) -f ../../Makefile site SITE=$(@F)
site: clean site.mk site.conf modules site: siteclean site.mk site.conf modules
.PHONY: clean .PHONY: siteclean
clean: siteclean:
rm -f site.mk site.conf modules rm -f site.mk site.conf modules
modules: modules:

62
build.sh Executable file
View file

@ -0,0 +1,62 @@
#!/bin/bash -e
function announce () {
echo '############################' $* >&2
}
proc=$(nproc)
while getopts g:bj:v opt; do
case "$opt" in
g) gluon_path="$OPTARG" ;;
b) export BROKEN=1 ;;
j) proc="$OPTARG" ;;
v) verbose=V=s ;;
esac
done
if [ -z "${gluon_path}" ]; then
echo "Usage: $0 -g GLUON_PATH" >&2
echo " GLUON_PATH Path to a checkout of the gluon repository." >&2
echo " -b BROKEN=1" >&2
echo " -j JOBS Run build with -jJOBS. Default: ${proc}" >&2
exit 1
fi
gluon_path=$(realpath $gluon_path)
site_path=$(realpath $(dirname $BASH_SOURCE))
announce GLUON: $gluon_path >&2
announce FFHH SITES: $site_path >&2
# Build the site repo and generate all site configs
announce Building site repo and reading data >&2
pushd $site_path > /dev/null
make
. info
export GLUON_RELEASE
export GLUON_BRANCH
# get the available sites...
sites=""
for s in sites/*; do sites="${sites} ${s##*/}"; done
announce Gluon will be built for the following sites:$sites >&2
announce The following targets will be generated: $targets >&2
popd >/dev/null
pushd "${gluon_path}" >/dev/null
announce Starting make update...
for s in $sites; do
export GLUON_SITEDIR="${site_path}/sites/${s}"
export GLUON_OUTPUTDIR="${HOME}/firmware/${s}/${GLUON_BRANCH}/${GLUON_RELEASE}"
export GLUON_IMAGEDIR="${GLUON_OUTPUTDIR}/images"
export GLUON_MODULEDIR="${GLUON_OUTPUTDIR}/modules"
rm -rf "${GLUON_OUTPUTDIR}"
mkdir -p "${GLUON_IMAGEDIR}" "${GLUON_MODULEDIR}"
make update
for t in $targets; do
announce Starting build for $s/$t... >&2
make -j$(nproc) GLUON_TARGET=$t $verbose
done
announce Building manifest...
make manifest
done
popd >/dev/null

View file

@ -1,7 +1,18 @@
<% <%
#gluon_release = "0.8.4+exp" + Time.new.strftime("%Y%m%d") #gluon_branch = "stable"
gluon_release = "0.8.4" gluon_branch = "experimental"
gluon_branch = "stable" gluon_release = "0.8.5"
# Add the +exp and current date if this is an experimental release
gluon_release += "+exp" + Time.new.strftime("%Y%m%d") if gluon_branch == "experimental"
gluon_targets = %w(
ar71xx-generic
ar71xx-nand
mpc85xx-generic
x86-generic
x86-64
)
gluon_site_packages = %w( gluon_site_packages = %w(
gluon-autoupdater gluon-autoupdater

3
template/info.erb Normal file
View file

@ -0,0 +1,3 @@
GLUON_RELEASE="<%= gluon_release %>"
GLUON_BRANCH="<%= gluon_branch %>"
targets="<%= gluon_targets.join(" ") %>"