Skip to content

Commit 5ccb65f

Browse files
committedDec 16, 2016
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 llvm-svn: 289909
1 parent ed4eb86 commit 5ccb65f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎clang/tools/clang-format-vs/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ if (BUILD_CLANG_FORMAT_VS_PLUGIN)
1111
"${CLANG_SOURCE_DIR}/LICENSE.TXT"
1212
"${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat/license.txt")
1313

14+
# Build number added to Clang version to ensure that new VSIX can be upgraded
15+
string(TIMESTAMP CLANG_FORMAT_VSIX_BUILD %y%m%d%H%M UTC)
16+
1417
if (NOT CLANG_FORMAT_VS_VERSION)
15-
set(CLANG_FORMAT_VS_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
18+
set(CLANG_FORMAT_VS_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}.${CLANG_FORMAT_VSIX_BUILD}")
1619
endif()
1720

1821
configure_file("source.extension.vsixmanifest.in"

0 commit comments

Comments
 (0)
Please sign in to comment.