Moved STATUS information from project.cfg to builder.cfg
This commit is contained in:
parent
38255ee031
commit
353bd1754c
@ -9,6 +9,15 @@
|
|||||||
#################################
|
#################################
|
||||||
TMP_DIR=/tmp
|
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
|
# CREATOR
|
||||||
###############################
|
###############################
|
||||||
@ -20,6 +29,8 @@ CREATOR_TAG=xx
|
|||||||
CREATOR_NAME="Your name"
|
CREATOR_NAME="Your name"
|
||||||
CREATOR_EMAIL="your-email@domain.de"
|
CREATOR_EMAIL="your-email@domain.de"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##################################
|
##################################
|
||||||
# OPSI repository settings
|
# OPSI repository settings
|
||||||
#################################
|
#################################
|
||||||
|
@ -14,32 +14,41 @@ builder_config() {
|
|||||||
test -d ${TMP_DIR}
|
test -d ${TMP_DIR}
|
||||||
builder_check_error "temp directory not available: $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
|
local config=${PRODUCT_DIR}/builder-product.cfg
|
||||||
test -f ${config} || builder_check_error "can't read product config: ${config}"
|
test -f ${config} || builder_check_error "can't read product config: ${config}"
|
||||||
. ${config}
|
. ${config}
|
||||||
|
|
||||||
# change some variable dynamically
|
# set default build configuration and source the user dependent file
|
||||||
# - autogenerate release number, if we are in status "integration"
|
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
|
if [ "$STATUS" = "integration" ] ; then
|
||||||
# OPSI/control:RELEASE is limited to max 16 chars - take care in regards to the CREATOR_TAG
|
# OPSI/control:RELEASE is limited to max 16 chars - take care in regards to the CREATOR_TAG
|
||||||
RELEASE="`date +%Y%m%d%H%M`"
|
RELEASE="`date +%Y%m%d%H%M`"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set default build configuration and source the user dependent file
|
# Read configurationfile
|
||||||
. $BASEDIR/conf/opsi-builder.cfg
|
. ${config}
|
||||||
|
echo "Loaded builder configuration: $config"
|
||||||
# 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"
|
|
||||||
|
|
||||||
# Check variables
|
# Check variables
|
||||||
if [ -z ${OPSI_REPOS_BASE_DIR} ] || [ ! -d ${OPSI_REPOS_BASE_DIR} ] ; then
|
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"
|
echo "configuration error: OPSI_REPOS_BASE_DIR directory does not exist: $OPSI_REPOS_BASE_DIR"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
|
@ -8,14 +8,6 @@ RELEASE="3"
|
|||||||
PRIORITY="0"
|
PRIORITY="0"
|
||||||
ADVICE=""
|
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.
|
# TYPE - defines, if the install files are public or restricted.
|
||||||
# Valid value: restrict | public
|
# Valid value: restrict | public
|
||||||
TYPE="public"
|
TYPE="public"
|
||||||
|
Loading…
Reference in New Issue
Block a user