Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: git-hash injection on every build #1641

Merged
merged 3 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions common/configure
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ addUninstallDir () {
}

addComment () {
printf "\t#install $1\n" >> ${MAKEFILE}
printf "\t#uninstall files $1\n" >> ${UNINSTALL_FILES}
printf "\t#uninstall directory $1\n" >> ${UNINSTALL_DIRS}
printf "\t# Install $1\n" >> ${MAKEFILE}
printf "\t# Uninstall files $1\n" >> ${UNINSTALL_FILES}
printf "\t# Uninstall directory $1\n" >> ${UNINSTALL_DIRS}
}

addNewline () {
Expand Down Expand Up @@ -161,7 +161,7 @@ printf "DEST=\$(DESTDIR)\$(PREFIX)\n\n" >> ${MAKEFILE}

printf "all:\tbuild\n\n" >> ${MAKEFILE}

printf "build:\ttranslate compress\n\n" >> ${MAKEFILE}
printf "build:\ttranslate compress\n" >> ${MAKEFILE}

printf "clean:\n" >> ${MAKEFILE}
printf "\trm -f po/*.mo\n" >> ${MAKEFILE}
Expand All @@ -174,6 +174,9 @@ printf "\n" >> ${MAKEFILE}

# Create install and uninstall target
printf "install:\tinstall_translations\n" >> ${MAKEFILE}
printf "\n\t# Inject version string into source files\n" >> ${MAKEFILE}
printf "\t(cd .. && ./updateversion.sh)\n\n" >> ${MAKEFILE}

addComment "python"
addUninstallDir "/share/backintime/common/__pycache__"
addUninstallFile "*.pyc" "/share/backintime/common/__pycache__"
Expand Down Expand Up @@ -237,10 +240,10 @@ addNewline

#compress
printf "compress:\n" >> ${MAKEFILE}
printf "\t#man pages\n" >> ${MAKEFILE}
printf "\t# Man pages\n" >> ${MAKEFILE}
printf "\tfor i in \$\$(ls -1 man/C/); do case \$\$i in *.gz|*~) continue;; *) gzip -n --best -c man/C/\$\$i > man/C/\$\${i}.gz;; esac; done\n\n" >> ${MAKEFILE}

printf "\t#config-examples\n" >> ${MAKEFILE}
printf "\t# Config-examples\n" >> ${MAKEFILE}
printf "\tgzip -n --best -c config-example-local > config-example-local.gz\n" >> ${MAKEFILE}
printf "\tgzip -n --best -c config-example-ssh > config-example-ssh.gz\n\n" >> ${MAKEFILE}

Expand Down
16 changes: 10 additions & 6 deletions qt/configure
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ addUninstallDir () {
}

addComment () {
printf "\t#install $1\n" >> ${MAKEFILE}
printf "\t#uninstall files $1\n" >> ${UNINSTALL_FILES}
printf "\t#uninstall directory $1\n" >> ${UNINSTALL_DIRS}
printf "\t# Install $1\n" >> ${MAKEFILE}
printf "\t# Uninstall files $1\n" >> ${UNINSTALL_FILES}
printf "\t# Uninstall directory $1\n" >> ${UNINSTALL_DIRS}
}

addNewline () {
Expand Down Expand Up @@ -144,15 +144,19 @@ printf "clean:\n" >> ${MAKEFILE}
printf "\trm -f po/*.mo\n" >> ${MAKEFILE}
printf "\trm -f man/C/*.gz\n\n" >> ${MAKEFILE}

#create install and uninstall target
# Create install and uninstall target
printf "install:\n" >> ${MAKEFILE}

# Migration
printf "\t#clean-up installed old files that were renamed or moved in later BiT versions\n" >> ${MAKEFILE}
printf "\t# Clean-up installed old files that were renamed or moved in later BiT versions\n" >> ${MAKEFILE}
printf "\trm -f \$(DEST)/etc/dbus-1/system.d/net.launchpad.backintime.serviceHelper.conf\n" >> ${MAKEFILE}
printf "\trm -f \$(DEST)/share/backintime/plugins/qt4plugin.py\n" >> ${MAKEFILE}
addNewline

printf "\t# Inject version string into source files\n" >> ${MAKEFILE}
printf "\t(cd .. && ./updateversion.sh)\n" >> ${MAKEFILE}
addNewline

addComment "python"
addUninstallDir "/share/backintime/qt/__pycache__"
addUninstallFile "*.pyc" "/share/backintime/qt/__pycache__"
Expand Down Expand Up @@ -227,7 +231,7 @@ addNewline

#compress
printf "compress:\n" >> ${MAKEFILE}
printf "\t#man pages\n" >> ${MAKEFILE}
printf "\t# Man pages\n" >> ${MAKEFILE}
printf "\tfor i in \$\$(ls -1 man/C/); do case \$\$i in *.gz|*~) continue;; *) gzip -n --best -c man/C/\$\$i > man/C/\$\${i}.gz;; esac; done\n\n" >> ${MAKEFILE}

#uninstall
Expand Down