Moved STATUS information from project.cfg to builder.cfg

This commit is contained in:
Daniel Schwager 2012-01-28 11:20:26 +01:00
parent 38255ee031
commit 353bd1754c
3 changed files with 31 additions and 19 deletions

View File

@ -9,6 +9,15 @@
#################################
TMP_DIR=/tmp
# STATUS - defines the stabability of the build
# Valid values:
# integration: this is used by a continuous integration server.
# NOTE: The 'RELEASE'-variable inside builder-project.cfg
# will be increased AUTOMATICALLY !!
# testing : it's in the testing/QM process
# release : passed the testing and go's to productive
STATUS="integration"
###############################
# CREATOR
###############################
@ -20,6 +29,8 @@ CREATOR_TAG=xx
CREATOR_NAME="Your name"
CREATOR_EMAIL="your-email@domain.de"
##################################
# OPSI repository settings
#################################

View File

@ -14,32 +14,41 @@ builder_config() {
test -d ${TMP_DIR}
builder_check_error "temp directory not available: $TMP_DIR"
# Source product release configuration
# project dependent configuration
local config=${PRODUCT_DIR}/builder-product.cfg
test -f ${config} || builder_check_error "can't read product config: ${config}"
. ${config}
# change some variable dynamically
# - autogenerate release number, if we are in status "integration"
# set default build configuration and source the user dependent file
local config=$BASEDIR/conf/opsi-builder.cfg
. ${config}
# Source local build configuration (must be done AFTER sourcing the builder-product.cfg.cfg)
if [ -f "$OPSI_BUILDER" ] ; then
config=$OPSI_BUILDER
else
test -f $HOME/.opsi-builder.cfg && config=$HOME/.opsi-builder.cfg
fi
# Read ONLY the STATUS variable from the build configuration file
eval "`grep -E "^STATUS=" $config`"
# change some variable from the builder-product.cfg dynamically:
# autogenerate release number, if we are in status "integration"
if [ "$STATUS" = "integration" ] ; then
# OPSI/control:RELEASE is limited to max 16 chars - take care in regards to the CREATOR_TAG
RELEASE="`date +%Y%m%d%H%M`"
fi
# set default build configuration and source the user dependent file
. $BASEDIR/conf/opsi-builder.cfg
# Source local build configuration (must be done AFTER sourcing the release.cfg)
config=$HOME/.opsi-builder.cfg
test -f ${config} && . ${config} && echo "Loaded builder configuration: ${config}"
test -f "$OPSI_BUILDER" && . $OPSI_BUILDER && echo "Loaded builder configuration: $OPSI_BUILDER"
# Read configurationfile
. ${config}
echo "Loaded builder configuration: $config"
# Check variables
if [ -z ${OPSI_REPOS_BASE_DIR} ] || [ ! -d ${OPSI_REPOS_BASE_DIR} ] ; then
echo "configuration error: OPSI_REPOS_BASE_DIR directory does not exist: $OPSI_REPOS_BASE_DIR"
exit 2
fi
}
#####################

View File

@ -8,14 +8,6 @@ RELEASE="3"
PRIORITY="0"
ADVICE=""
# STATUS - defines the stabability of the build
# Valid values:
# integration: this is used by a continuous integration server.
# Note: The RELEASE will be set AUTOMATICALLY !!
# testing : it's in the testing/QM process
# release : passed the testing and go's to productive
STATUS="integration"
# TYPE - defines, if the install files are public or restricted.
# Valid value: restrict | public
TYPE="public"