summaryrefslogtreecommitdiffstats
path: root/tools/clang-format-vs
diff options
context:
space:
mode:
authorAntonio Maiorano <amaiorano@gmail.com>2016-12-16 01:37:01 +0000
committerAntonio Maiorano <amaiorano@gmail.com>2016-12-16 01:37:01 +0000
commit0ecff4a7672fe091632909220198e9cd94a319ce (patch)
tree50dfbd0d3e6467b1c6d2070c8d86a056da684867 /tools/clang-format-vs
parent1b3f221e0fa955fdc3ed84522123f1c06f266c48 (diff)
clang-format-vsix: add a date stamp to the VSIX version number to ensure upgradability
Presently, the version number of the VSIX matches the LLVM version number. However, as this number doesn't change often, it means that as we release new versions of this VSIX, it will have the same version number, which means users must first uninstall the old version before installing the new one. With this change, we generate a 4th part to the version number that is a date stamp (year, month, day); for example: 4.0.0.161203. Differential Revision: https://reviews.llvm.org/D27438 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-format-vs')
-rw-r--r--tools/clang-format-vs/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/clang-format-vs/CMakeLists.txt b/tools/clang-format-vs/CMakeLists.txt
index 6d2ef73632..d07a4f6ed5 100644
--- a/tools/clang-format-vs/CMakeLists.txt
+++ b/tools/clang-format-vs/CMakeLists.txt
@@ -11,8 +11,11 @@ if (BUILD_CLANG_FORMAT_VS_PLUGIN)
"${CLANG_SOURCE_DIR}/LICENSE.TXT"
"${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/license.txt")
+ # Build number added to Clang version to ensure that new VSIX can be upgraded
+ string(TIMESTAMP CLANG_FORMAT_VSIX_BUILD %y%m%d%H%M UTC)
+
if (NOT CLANG_FORMAT_VS_VERSION)
- set(CLANG_FORMAT_VS_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
+ set(CLANG_FORMAT_VS_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}.${CLANG_FORMAT_VSIX_BUILD}")
endif()
configure_file("source.extension.vsixmanifest.in"