Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nord Site
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Freifunk Nord
Nord Site
Commits
1ffe77b9
Commit
1ffe77b9
authored
8 years ago
by
rubo77
Browse files
Options
Downloads
Patches
Plain Diff
make-release.sh added to automate build and manifest process
parent
2bc978c5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
make-release.sh
+104
-0
104 additions, 0 deletions
make-release.sh
with
104 additions
and
0 deletions
make-release.sh
0 → 100644
+
104
−
0
View file @
1ffe77b9
#!/bin/bash
## This script will compile Gluon for all architectures, create the
## manifest and sign it. For that, you must have clone gluon and have a
## valid site config. Additionally, the signing key must be present in
## ../../ecdsa-key-secret or defined as first argument.
## The second argument defines the branch (stable, beta, experimental).
## The third argument defines the version.
## Call from site directory with the version and branch variables
## properly configured in this script.
# if version is unset, will use the default experimental version from site.mk
VERSION
=
${
3
:-
"2016.2~exp
$(
date
'+%y%m%d%H%M'
)
"
}
# branch must be set to either experimental, beta or stable
BRANCH
=
${
2
:-
"stable"
}
# must point to valid ecdsa signing key created by ecdsakeygen, relative to Gluon base directory
SIGNING_KEY
=
${
1
:-
"../ecdsa-key-secret"
}
#BROKEN must be set to "" or "BROKEN=1"
BROKEN
=
"BROKEN=1"
cd
..
if
[
!
-d
"site"
]
;
then
echo
"This script must be called from within the site directory"
return
fi
if
[
"
$(
whoami
)
"
==
"root"
]
;
then
echo
"Make may not be run as root"
return
fi
echo
"############## starting build process #################"
>>
build.log
date
>>
build.log
echo
"if you want to start over empty the folder ../output/"
echo
"see debug output with"
echo
"tail -f ../build.log &"
sleep
3
#rm -r output
for
TARGET
in
ar71xx-generic ar71xx-mikrotik ar71xx-nand brcm2708-bcm2708 brcm2708-bcm2709 mpc85xx-generic ramips-rt305x sunxi x86-64 x86-generic x86-kvm_guest x86-xen_domu
do
date
>>
build.log
if
[
-z
"
$VERSION
"
]
then
echo
"Starting work on target
$TARGET
"
|
tee
-a
build.log
echo
-e
"
\n\n\n
make GLUON_TARGET=
$TARGET
GLUON_BRANCH=stable update"
>>
build.log
make
GLUON_TARGET
=
$TARGET
GLUON_BRANCH
=
stable update
>>
build.log 2>&1
echo
-e
"
\n\n\n
make GLUON_TARGET=
$TARGET
GLUON_BRANCH=stable clean"
>>
build.log
make
GLUON_TARGET
=
$TARGET
GLUON_BRANCH
=
stable clean
>>
build.log 2>&1
echo
-e
"
\n\n\n
make GLUON_TARGET=
$TARGET
GLUON_BRANCH=stable V=s
$BROKEN
"
>>
build.log
make
GLUON_TARGET
=
$TARGET
GLUON_BRANCH
=
stable
V
=
s
$BROKEN
>>
build.log 2>&1
echo
-e
"
\n\n\n
============================================================
\n\n
"
>>
build.log
else
echo
"Starting work on target
$TARGET
"
|
tee
-a
build.log
echo
-e
"
\n\n\n
make GLUON_TARGET=
$TARGET
GLUON_BRANCH=stable GLUON_RELEASE=
$VERSION
update"
>>
build.log
make
GLUON_TARGET
=
$TARGET
GLUON_BRANCH
=
stable
GLUON_RELEASE
=
$VERSION
update
>>
build.log 2>&1
echo
-e
"
\n\n\n
make GLUON_TARGET=
$TARGET
GLUON_BRANCH=stable GLUON_RELEASE=
$VERSION
clean"
>>
build.log
make
GLUON_TARGET
=
$TARGET
GLUON_BRANCH
=
stable
GLUON_RELEASE
=
$VERSION
clean
>>
build.log 2>&1
echo
-e
"
\n\n\n
make GLUON_TARGET=
$TARGET
GLUON_BRANCH=stable GLUON_RELEASE=
$VERSION
V=s
$BROKEN
"
>>
build.log
make
GLUON_TARGET
=
$TARGET
GLUON_BRANCH
=
stable
GLUON_RELEASE
=
$VERSION
V
=
s
$BROKEN
>>
build.log 2>&1
echo
-e
"
\n\n\n
============================================================
\n\n
"
>>
build.log
fi
done
date
>>
build.log
echo
"Compilation complete, creating manifest(s)"
|
tee
-a
build.log
echo
-e
"make GLUON_BRANCH=experimental manifest"
>>
build.log
make
GLUON_BRANCH
=
experimental manifest
>>
build.log 2>&1
echo
-e
"
\n\n\n
============================================================
\n\n
"
>>
build.log
if
[[
"
$BRANCH
"
==
"beta"
]]
||
[[
"
$BRANCH
"
==
"stable"
]]
then
echo
-e
"make GLUON_BRANCH=beta manifest"
>>
build.log
make
GLUON_BRANCH
=
beta manifest
>>
build.log 2>&1
echo
-e
"
\n\n\n
============================================================
\n\n
"
>>
build.log
fi
if
[[
"
$BRANCH
"
==
"stable"
]]
then
echo
-e
"make GLUON_BRANCH=stable manifest"
>>
build.log
make
GLUON_BRANCH
=
stable manifest
>>
build.log 2>&1
echo
-e
"
\n\n\n
============================================================
\n\n
"
>>
build.log
fi
echo
"Manifest creation complete, signing manifest"
echo
-e
"contrib/sign.sh
$SIGNING_KEY
output/images/sysupgrade/experimental.manifest"
>>
build.log
contrib/sign.sh
$SIGNING_KEY
output/images/sysupgrade/experimental.manifest
>>
build.log 2>&1
if
[[
"
$BRANCH
"
==
"beta"
]]
||
[[
"
$BRANCH
"
==
"stable"
]]
then
echo
-e
"contrib/sign.sh
$SIGNING_KEY
output/images/sysupgrade/beta.manifest"
>>
build.log
contrib/sign.sh
$SIGNING_KEY
output/images/sysupgrade/beta.manifest
>>
build.log 2>&1
fi
if
[[
"
$BRANCH
"
==
"stable"
]]
then
echo
-e
"contrib/sign.sh
$SIGNING_KEY
output/images/sysupgrade/stable.manifest"
>>
build.log
contrib/sign.sh
$SIGNING_KEY
output/images/sysupgrade/stable.manifest
>>
build.log 2>&1
fi
cd
site
date
>>
build.log
echo
"Done :)"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment