mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 00:44:55 -06:00
Many Microsoft employees have contributed to the Windows Subsystem for Linux, this commit is the result of their work since 2016. The entire history of the Windows Subsystem for Linux can't be shared here, but here's an overview of WSL's history after it moved to it own repository in 2021: Number of commits on the main branch: 2930 Number of contributors: 31 Head over https://github.com/microsoft/WSL/releases for a more detailed history of the features added to WSL since 2021.
26 lines
1.1 KiB
CMake
26 lines
1.1 KiB
CMake
function(get_version_impl command var_name)
|
|
execute_process(
|
|
COMMAND powershell.exe
|
|
-NoProfile
|
|
-NonInteractive
|
|
-ExecutionPolicy Bypass
|
|
-Command "$env:Path += ';${GITVERSION_SOURCE_DIR}' ; . .\\tools\\devops\\version_functions.ps1 ; ${command}"
|
|
OUTPUT_VARIABLE OUTPUT_VERSION
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
COMMAND_ERROR_IS_FATAL ANY)
|
|
string(STRIP "${OUTPUT_VERSION}" OUTPUT_VERSION)
|
|
SET(${var_name} ${OUTPUT_VERSION} PARENT_SCOPE)
|
|
endfunction()
|
|
|
|
function(find_commit_hash var_name)
|
|
get_version_impl("Get-Current-Commit-Hash" "command_output")
|
|
SET(${var_name} ${command_output} PARENT_SCOPE)
|
|
endfunction()
|
|
|
|
function(find_version msix_var_name nuget_var_name)
|
|
get_version_impl("Get-VersionInfo -Nightly $false | ConvertTo-Json" "command_output")
|
|
string(JSON "${msix_var_name}" GET "${command_output}" MsixVersion)
|
|
string(JSON "${nuget_var_name}" GET "${command_output}" NugetVersion)
|
|
|
|
return(PROPAGATE ${msix_var_name} ${nuget_var_name})
|
|
endfunction() |