1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-15 07:01:18 +02:00

Use git-describe in versions

Reference-to: https://github.com/tenacityteam/tenacity/pull/396

Signed-off-by: Sol Fisher Romanoff <sol@solfisher.com>
This commit is contained in:
Sol Fisher Romanoff
2021-08-03 13:52:23 +03:00
committed by GitHub
parent 4f1d9f6f63
commit 56c953a14d
6 changed files with 45 additions and 64 deletions

View File

@@ -232,7 +232,7 @@ function( audacity_append_common_compiler_options var use_pch )
-DAUDACITY_MODLEVEL=${AUDACITY_MODLEVEL}
# Version string for visual display
-DAUDACITY_VERSION_STRING=L"${AUDACITY_VERSION}.${AUDACITY_RELEASE}.${AUDACITY_REVISION}${AUDACITY_SUFFIX}"
-DAUDACITY_VERSION_STRING=L"${GIT_DESCRIBE}"
# This value is used in the resource compiler for Windows
-DAUDACITY_FILE_VERSION=L"${AUDACITY_VERSION},${AUDACITY_RELEASE},${AUDACITY_REVISION},${AUDACITY_MODLEVEL}"

View File

@@ -206,7 +206,7 @@
<key>CFBundleExecutable</key>
<string>Wrapper</string>
<key>CFBundleGetInfoString</key>
<string>Audacity version ${AUDACITY_INFO_VERSION}</string>
<string>Audacity version ${GIT_DESCRIBE}</string>
<key>CFBundleIconFile</key>
<string>Audacity.icns</string>
<key>CFBundleIdentifier</key>
@@ -214,17 +214,17 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>Version ${AUDACITY_INFO_VERSION}</string>
<string>Version ${GIT_DESCRIBE}</string>
<key>CFBundleName</key>
<string>Audacity</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${AUDACITY_INFO_VERSION}</string>
<string>${GIT_DESCRIBE}</string>
<key>CFBundleSignature</key>
<string>auDy</string>
<key>CFBundleVersion</key>
<string>${AUDACITY_INFO_VERSION}</string>
<string>${GIT_DESCRIBE}</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.music</string>
<key>NSHighResolutionCapable</key>
@@ -232,7 +232,7 @@
<key>NSRequiresAquaSystemAppearance</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Audacity version ${AUDACITY_INFO_VERSION}</string>
<string>Audacity version ${GIT_DESCRIBE}</string>
<key>NSMicrophoneUsageDescription</key>
<string>Audacity requires access to the microphone only if you intend to record from it.</string>
<key>NSPrincipalClass</key>

View File

@@ -1,16 +1,8 @@
set(CPACK_PACKAGE_VERSION_MAJOR "${AUDACITY_VERSION}") # X
set(CPACK_PACKAGE_VERSION_MINOR "${AUDACITY_RELEASE}") # Y
set(CPACK_PACKAGE_VERSION_PATCH "${AUDACITY_REVISION}") # Z
set(CPACK_PACKAGE_VENDOR "Tenacity")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://tenacityaudio.org")
# X.Y.Z-alpha-20210615
set(CPACK_PACKAGE_VERSION "${AUDACITY_VERSION}.${AUDACITY_RELEASE}.${AUDACITY_REVISION}${AUDACITY_SUFFIX}")
if(NOT AUDACITY_BUILD_LEVEL EQUAL 2)
# X.Y.Z-alpha-20210615+a1b2c3d
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}+${GIT_COMMIT_SHORT}")
endif()
# X.Y.Z-alpha-1337-gdeadbee
set(CPACK_PACKAGE_VERSION "${GIT_DESCRIBE}")
# Custom variables use CPACK_AUDACITY_ prefix. CPACK_ to expose to CPack,
# AUDACITY_ to show it is custom and avoid conflicts with other projects.
@@ -24,12 +16,12 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(os "linux")
endif()
# tenacity-linux-X.Y.Z-alpha-20210615
# tenacity-linux-X.Y.Z-alpha-1337-gdeadbee
set(CPACK_PACKAGE_FILE_NAME "tenacity-${os}-${CPACK_PACKAGE_VERSION}")
set(zsync_name "tenacity-${os}-*") # '*' is wildcard (here it means any version)
if(DEFINED AUDACITY_ARCH_LABEL)
# tenacity-linux-X.Y.Z-alpha-20210615-x86_64
# tenacity-linux-X.Y.Z-alpha-1337-gdeadbee-x86_64
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${AUDACITY_ARCH_LABEL}")
set(zsync_name "${zsync_name}-${AUDACITY_ARCH_LABEL}")
set(CPACK_AUDACITY_ARCH_LABEL "${AUDACITY_ARCH_LABEL}")