Skip to content

Commit

Permalink
clang-format-vsix: add a date stamp to the VSIX version number to ens…
Browse files Browse the repository at this point in the history
…ure 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
  • Loading branch information
amaiorano committed Dec 16, 2016
1 parent ed4eb86 commit 5ccb65f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clang/tools/clang-format-vs/CMakeLists.txt
Expand Up @@ -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"
Expand Down

0 comments on commit 5ccb65f

Please sign in to comment.