Add build target 'publish_installer' also to Windows builds

This change requires the unix tool date.exe to be available under a
specific path. This tool is the only one which easily produces
locale independent date formats. All Windows solutions are either
very complicated or regional dependent.
This commit is contained in:
Roland Winklmeier
2017-03-03 20:30:58 +01:00
committed by Mathew Sutcliffe
parent 366ae1f6df
commit e186829db3

View File

@@ -309,13 +309,21 @@ bitrock_builder_bin = $$(BITROCK_BUILDER)
############### Publish Jenkins build artifact ###############
unix:!isEmpty(create_installer.commands) {
isEmpty(INSTALLER_CONTAINER_EXT) {
PUBLISHED_FILENAME = $${INSTALLER_BASENAME}_$$system(date -u '+%F_%H-%M-%S').$${INSTALLER_EXT}
publish_installer.commands = mv $${INSTALLER_BASENAME}.$${INSTALLER_EXT} ../$${PUBLISHED_FILENAME}
} else {
PUBLISHED_FILENAME = $${INSTALLER_BASENAME}_$$system(date -u '+%F_%H-%M-%S').$${INSTALLER_CONTAINER_EXT}
publish_installer.commands = mv $${INSTALLER_BASENAME}.$${INSTALLER_CONTAINER_EXT} ../$${PUBLISHED_FILENAME}
!isEmpty(create_installer.commands) {
win32: {
# Fixme: the path to date.exe is currently hard coded
PUBLISHED_FILENAME = $${INSTALLER_BASENAME}_$$system(C:\UnxUtils\usr\local\wbin\date.exe -u +%Y-%m-%d_%H-%M-%S).$${INSTALLER_EXT}
publish_installer.commands = move $${INSTALLER_BASENAME}.$${INSTALLER_EXT} ../$${PUBLISHED_FILENAME}
}
unix: {
isEmpty(INSTALLER_CONTAINER_EXT) {
PUBLISHED_FILENAME = $${INSTALLER_BASENAME}_$$system(date -u '+%F_%H-%M-%S').$${INSTALLER_EXT}
publish_installer.commands = mv $${INSTALLER_BASENAME}.$${INSTALLER_EXT} ../$${PUBLISHED_FILENAME}
} else {
PUBLISHED_FILENAME = $${INSTALLER_BASENAME}_$$system(date -u '+%F_%H-%M-%S').$${INSTALLER_CONTAINER_EXT}
publish_installer.commands = mv $${INSTALLER_BASENAME}.$${INSTALLER_CONTAINER_EXT} ../$${PUBLISHED_FILENAME}
}
}
publish_installer.depends = create_installer