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}) ...@@ -43,17 +43,23 @@ TOPDIR=$(get_topdir ${0})
main() { main() {
local self local self
local forcebuild
self=${0} self=${0}
shift shift
forcebuild=0
config_set_defaults config_set_defaults
while getopts 'c:' o; do while getopts 'c:f' o; do
case "${o}" in case "${o}" in
c) c)
. ${OPTARG} . ${OPTARG}
;; ;;
f)
forcebuild=1
;;
esac esac
done done
...@@ -64,7 +70,7 @@ main() { ...@@ -64,7 +70,7 @@ main() {
update_codebase || exit ${?} update_codebase || exit ${?}
if ! should_build; then if ! should_build ${forcebuild}; then
unlock_build unlock_build
exit 0 exit 0
fi fi
......
...@@ -93,6 +93,10 @@ update_codebase() { ...@@ -93,6 +93,10 @@ update_codebase() {
should_build() { should_build() {
local lastbuild local lastbuild
local currenthashish local currenthashish
local forcebuild
forcebuild=${1}
[ ${forcebuild} -gt 0 ] && return 0
if [ ! -f ${HBSD_CACHEDIR}/last_build.txt ]; then if [ ! -f ${HBSD_CACHEDIR}/last_build.txt ]; then
return 0 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