From 7397364b95d39be6d2d339284ac97d862ad0f9d2 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin Date: Sun, 14 Aug 2022 17:39:42 +0300 Subject: [PATCH] Set internal release versions more flexible (#352) --- scripts/executing_commands_for_glibc.sh | 3 ++- scripts/executing_commands_for_musl.sh | 3 ++- scripts/executing_commands_for_uclibc.sh | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/executing_commands_for_glibc.sh b/scripts/executing_commands_for_glibc.sh index 58b48d8a..4779c6dd 100755 --- a/scripts/executing_commands_for_glibc.sh +++ b/scripts/executing_commands_for_glibc.sh @@ -3,7 +3,8 @@ # Please check BR2_ROOTFS_POST_BUILD_SCRIPT option in config # -date "+OPENIPC_VERSION=2.2.%m.%d" >>${TARGET_DIR}/usr/lib/os-release +D=$(date "+%y.%m.%d") +echo "OPENIPC_VERSION=${D:0:1}.${D:1}" >>${TARGET_DIR}/usr/lib/os-release date "+GITHUB_VERSION=\"${BRANCH_NAME}+${GIT_HASH}, %Y-%m-%d\"" >>${TARGET_DIR}/usr/lib/os-release if grep -q fpv_defconfig ${BR2_CONFIG}; then echo "BUILD_OPTION=fpv" >>${TARGET_DIR}/usr/lib/os-release diff --git a/scripts/executing_commands_for_musl.sh b/scripts/executing_commands_for_musl.sh index ddf46850..60a1af9f 100755 --- a/scripts/executing_commands_for_musl.sh +++ b/scripts/executing_commands_for_musl.sh @@ -3,7 +3,8 @@ # Please check BR2_ROOTFS_POST_BUILD_SCRIPT option in config # -date "+OPENIPC_VERSION=2.2.%m.%d" >>${TARGET_DIR}/usr/lib/os-release +D=$(date "+%y.%m.%d") +echo "OPENIPC_VERSION=${D:0:1}.${D:1}" >>${TARGET_DIR}/usr/lib/os-release date "+GITHUB_VERSION=\"${BRANCH_NAME}+${GIT_HASH}, %Y-%m-%d\"" >>${TARGET_DIR}/usr/lib/os-release if grep -q fpv_defconfig ${BR2_CONFIG}; then echo "BUILD_OPTION=fpv" >>${TARGET_DIR}/usr/lib/os-release diff --git a/scripts/executing_commands_for_uclibc.sh b/scripts/executing_commands_for_uclibc.sh index 7a3f3565..ef79da49 100755 --- a/scripts/executing_commands_for_uclibc.sh +++ b/scripts/executing_commands_for_uclibc.sh @@ -3,7 +3,8 @@ # Please check BR2_ROOTFS_POST_BUILD_SCRIPT option in config # -date "+OPENIPC_VERSION=2.2.%m.%d" >>${TARGET_DIR}/usr/lib/os-release +D=$(date "+%y.%m.%d") +echo "OPENIPC_VERSION=${D:0:1}.${D:1}" >>${TARGET_DIR}/usr/lib/os-release date "+GITHUB_VERSION=\"${BRANCH_NAME}+${GIT_HASH}, %Y-%m-%d\"" >>${TARGET_DIR}/usr/lib/os-release if grep -q fpv_defconfig ${BR2_CONFIG}; then echo "BUILD_OPTION=fpv" >>${TARGET_DIR}/usr/lib/os-release @@ -20,4 +21,4 @@ if ! grep -q ^BR2_PACKAGE_WIFIBROADCAST=y ${BR2_CONFIG}; then rm -f ${TARGET_DIR}/usr/lib/libstdc++* fi -rm -f ${TARGET_DIR}/usr/bin/gdbserver \ No newline at end of file +rm -f ${TARGET_DIR}/usr/bin/gdbserver