From 1509dfc3b398bd69bf3fcc8bc12fccbc763b471d Mon Sep 17 00:00:00 2001 From: zhangsz Date: Sat, 22 Feb 2025 19:34:48 +0800 Subject: [PATCH] feat: upgarde enhancement --- bin/build.sh | 18 +++++++++++------- build/bin/wfcupgrade.sh | 0 2 files changed, 11 insertions(+), 7 deletions(-) mode change 100644 => 100755 build/bin/wfcupgrade.sh diff --git a/bin/build.sh b/bin/build.sh index 97adf1c..9dae990 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -44,7 +44,9 @@ pre-build-tar(){ if [ ! -d ${ReleseDir}/tars ]; then mkdir -p ${ReleseDir}/tars fi - source ${BuildRootDir}/bin/control.sh + source ${BuildRootDir}/bin/control.sh + sed -i "s/YYYYMMDD/${RelDate}/" ${BuildDockerDir}/env/wfc-release + git update-index --assume-unchanged ${BuildDockerDir}/env/wfc-release } pre-git-pull(){ @@ -70,7 +72,8 @@ pre-build-deb(){ if [ ! -d ${DebSystemdDir} ]; then mkdir -p ${DebSystemdDir} fi - + sed -i "s/YYYYMMDD/${RelDate}/" ${BuildDockerDir}/env/wfc-release + git update-index --assume-unchanged ${BuildDockerDir}/env/wfc-release } build-extras(){ @@ -196,9 +199,10 @@ create-deb(){ } post-build(){ - if [ -f ${TmpEnvFile} ] && [ ! -f ${BuildDockerDir}/.env ]; then - mv -f ${TmpEnvFile} ${BuildDockerDir}/.env - fi + # if [ -f ${TmpEnvFile} ] && [ ! -f ${BuildDockerDir}/.env ]; then + # mv -f ${TmpEnvFile} ${BuildDockerDir}/.env + # fi + git checkout ${BuildDockerDir}/env/wfc-release } case "$1" in @@ -224,7 +228,7 @@ case "$1" in build-dist copy-file create-tar - # post-build + post-build ;; "deb") if [ "$SKIP_PRE_GIT_PULL" = false ]; then @@ -237,7 +241,7 @@ case "$1" in copy-file copy-file-debbuild create-deb - # post-build + post-build ;; "src-tar") if [ "$SKIP_PRE_GIT_PULL" = false ]; then diff --git a/build/bin/wfcupgrade.sh b/build/bin/wfcupgrade.sh old mode 100644 new mode 100755