Unverified Commit 53363d9e authored by Shawn Webb's avatar Shawn Webb
Browse files

Support forcing a build



There are times when the git revision check prevents us from being able
to test this build framework. This commit teaches `bin/ci.sh` the `-f`
flag to force a build.

Signed-off-by: Shawn Webb's avatarShawn Webb <shawn.webb@hardenedbsd.org>
github-issue:	#5
parent 8e265065
......@@ -43,17 +43,23 @@ TOPDIR=$(get_topdir ${0})
main() {
local self
local forcebuild
self=${0}
shift
forcebuild=0
config_set_defaults
while getopts 'c:' o; do
while getopts 'c:f' o; do
case "${o}" in
c)
. ${OPTARG}
;;
f)
forcebuild=1
;;
esac
done
......@@ -64,7 +70,7 @@ main() {
update_codebase || exit ${?}
if ! should_build; then
if ! should_build ${forcebuild}; then
unlock_build
exit 0
fi
......
......@@ -93,6 +93,10 @@ update_codebase() {
should_build() {
local lastbuild
local currenthashish
local forcebuild
forcebuild=${1}
[ ${forcebuild} -gt 0 ] && return 0
if [ ! -f ${HBSD_CACHEDIR}/last_build.txt ]; then
return 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment