Merge pull request #6 from gador/dry-build

add a config option to not build the config locally
This commit is contained in:
Solène Rapenne 2023-05-04 16:50:57 +02:00 committed by GitHub
commit 33fc1e2772
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

7
bento
View File

@ -2,6 +2,7 @@
TIMEOUT=20
REMOTE_PORT=22
NOLOCALBUILD=0
# FUNCTION LIBRARIES
usage() {
@ -529,7 +530,11 @@ deploy_files() {
if [ "$CHANGES" -ne 0 ]
then
build_config "${STAGING_DIR}/${dest}/config/" "build" "" "${dest}"
if [ $NOLOCALBUILD -eq 1 ]; then
build_config "${STAGING_DIR}/${dest}/config/" "dry-build" "" "${dest}"
else
build_config "${STAGING_DIR}/${dest}/config/" "build" "" "${dest}"
fi
echo " update required"
# copy files in the chroot
install -d -o root -g sftp_users -m 755 "${CHROOT_DIR}"

View File

@ -9,3 +9,5 @@ REMOTE_IP=myserver.example
# port to connect to the remote server
# default is 22
#REMOTE_PORT=22
# don't build locally
#NOLOCALBUILD=1