Browse Source

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 <shawn.webb@hardenedbsd.org>
github-issue:	#5
master
Shawn Webb 9 months ago
parent
commit
53363d9ec2
Signed by: shawn.webb <shawn.webb@hardenedbsd.org> GPG Key ID: FF2E67A277F8E1FA
2 changed files with 12 additions and 2 deletions
  1. +8
    -2
      bin/ci.sh
  2. +4
    -0
      lib/util.sh

+ 8
- 2
bin/ci.sh View File

@@ -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


+ 4
- 0
lib/util.sh View File

@@ -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


Loading…
Cancel
Save