Skip to content

Commit f23b41e

Browse files
authored
Breaking coroutines means v3.0 (#1547)
* Start moving to v3.0 * Set more obvious placeholder version numbers
1 parent d254f72 commit f23b41e

File tree

10 files changed

+27
-17
lines changed

10 files changed

+27
-17
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: |
4242
$target_configuration = "${{ matrix.config }}"
4343
$target_platform = "${{ matrix.arch }}"
44-
$target_version = "1.2.3.4"
44+
$target_version = "999.999.999.999"
4545
$props = "Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version"
4646
if ("${{ matrix.compiler }}" -eq "clang-cl") {
4747
$props += ",Clang=1,PlatformToolset=ClangCl"
@@ -134,7 +134,7 @@ jobs:
134134
run: |
135135
$target_configuration = "${{ matrix.config }}"
136136
$target_platform = "${{ matrix.arch }}"
137-
$target_version = "1.2.3.4"
137+
$target_version = "999.999.999.999"
138138
$props = "Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version"
139139
if ("${{ matrix.compiler }}" -eq "clang-cl") {
140140
$props += ",Clang=1,PlatformToolset=ClangCl"
@@ -301,7 +301,7 @@ jobs:
301301
run: |
302302
$target_configuration = "${{ matrix.config }}"
303303
$target_platform = "${{ matrix.arch }}"
304-
$target_version = "1.2.3.4"
304+
$target_version = "999.999.999.999"
305305
Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version"
306306
307307
- name: Restore nuget packages
@@ -347,7 +347,7 @@ jobs:
347347
run: |
348348
$target_configuration = "${{ matrix.config }}"
349349
$target_platform = "${{ matrix.arch }}"
350-
$target_version = "1.2.3.4"
350+
$target_version = "999.999.999.999"
351351
Add-Content $env:GITHUB_ENV "msbuild_config_props=/p:Configuration=$target_configuration,Platform=$target_platform,CppWinRTBuildVersion=$target_version"
352352
353353
- name: Restore nuget packages

.pipelines/OneBranch.Official.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ variables:
1212
parameters:
1313
debug: ${{ parameters.debug }}
1414

15-
name: 2.0.$(date:yyMMdd)$(rev:.r)
15+
name: 3.0.$(date:yyMMdd)$(rev:.r)
1616

1717
trigger: none
1818

.pipelines/OneBranch.PullRequest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ variables:
1010
parameters:
1111
debug: ${{ parameters.debug }}
1212

13-
name: PullRequest_2.0.$(date:yyMMdd)$(rev:.r)
13+
name: PullRequest_3.0.$(date:yyMMdd)$(rev:.r)
1414

1515
trigger: none
1616

.pipelines/variables/version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ parameters:
44
default: false
55

66
variables:
7-
MajorVersion: "2"
7+
MajorVersion: "3"
88
MinorVersion: "0"
99
VersionDate: $[format('{0:yyMMdd}', pipeline.startTime)]
1010
VersionCounter: $[counter(variables['VersionDate'], 1)]

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ project(cppwinrt LANGUAGES CXX)
1313
set(CMAKE_CXX_STANDARD 17)
1414
set(CMAKE_CXX_STANDARD_REQUIRED True)
1515

16-
set(CPPWINRT_BUILD_VERSION "2.3.4.5" CACHE STRING "The version string used for cppwinrt.")
17-
if(CPPWINRT_BUILD_VERSION STREQUAL "2.3.4.5" OR CPPWINRT_BUILD_VERSION STREQUAL "0.0.0.0")
16+
set(CPPWINRT_BUILD_VERSION "999.999.999.999" CACHE STRING "The version string used for cppwinrt.")
17+
if(CPPWINRT_BUILD_VERSION STREQUAL "999.999.999.999" OR CPPWINRT_BUILD_VERSION STREQUAL "0.0.0.0")
1818
message(WARNING "CPPWINRT_BUILD_VERSION has been set to a dummy version string. Do not use in production!")
1919
endif()
2020
message(STATUS "Using version string: ${CPPWINRT_BUILD_VERSION}")

Directory.Build.Props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</PropertyGroup>
3838

3939
<PropertyGroup>
40-
<CppWinRTBuildVersion Condition="'$(CppWinRTBuildVersion)'==''">2.3.4.5</CppWinRTBuildVersion>
40+
<CppWinRTBuildVersion Condition="'$(CppWinRTBuildVersion)'==''">999.999.999.999</CppWinRTBuildVersion>
4141
<CppWinRTPlatform>$(Platform)</CppWinRTPlatform>
4242
<CppWinRTPlatform Condition="'$(Platform)'=='Win32'">x86</CppWinRTPlatform>
4343
<OutDir>$(SolutionDir)_build\$(CppWinRTPlatform)\$(Configuration)\</OutDir>

build_nuget.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
rem @echo off
22

33
set target_version=%1
4-
if "%target_version%"=="" set target_version=3.0.0.0
4+
if "%target_version%"=="" set target_version=999.999.999.999
55

66
call msbuild /m /p:Configuration=Release,Platform=x86,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:fast_fwd
77
call msbuild /m /p:Configuration=Release,Platform=x64,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:fast_fwd

build_test_all.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set clean_intermediate_files=%4
77

88
if "%target_platform%"=="" set target_platform=x64
99
if "%target_configuration%"=="" set target_configuration=Release
10-
if "%target_version%"=="" set target_version=1.2.3.4
10+
if "%target_version%"=="" set target_version=999.999.999.999
1111

1212
if not exist ".\.nuget" mkdir ".\.nuget"
1313
if not exist ".\.nuget\nuget.exe" powershell -Command "$ProgressPreference = 'SilentlyContinue' ; Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile .\.nuget\nuget.exe"

build_vsix.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set target_version=%2
66
set target_deployment=%3
77

88
if "%target_configuration%"=="" set target_configuration=Release
9-
if "%target_version%"=="" set target_version=1.2.3.4
9+
if "%target_version%"=="" set target_version=999.999.999.999
1010
if "%target_deployment%"=="" set target_deployment=Standalone
1111

1212
if not exist ".\.nuget" mkdir ".\.nuget"

prebuild/main.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,19 @@ namespace cppwinrt::strings {
7777

7878
writer version_rc;
7979

80+
// Extract major.minor substrings from CPPWINRT_VERSION_STRING (e.g. "3.0.250316.1")
81+
std::string_view const full_version{ CPPWINRT_VERSION_STRING };
82+
auto const first_dot = full_version.find('.');
83+
auto const second_dot = full_version.find('.', first_dot + 1);
84+
auto const ver_major = full_version.substr(0, first_dot);
85+
auto const ver_minor = full_version.substr(first_dot + 1, second_dot - first_dot - 1);
86+
8087
version_rc.write(R"(
8188
#include "winres.h"
8289
8390
VS_VERSION_INFO VERSIONINFO
84-
FILEVERSION 2,0,0,0
85-
PRODUCTVERSION 2,0,0,0
91+
FILEVERSION %,%,0,0
92+
PRODUCTVERSION %,%,0,0
8693
FILEFLAGSMASK 0x3fL
8794
#ifdef _DEBUG
8895
FILEFLAGS 0x1L
@@ -99,7 +106,7 @@ BEGIN
99106
BEGIN
100107
VALUE "CompanyName", "Microsoft Corporation"
101108
VALUE "FileDescription", "C++/WinRT"
102-
VALUE "FileVersion", "2.0.0.0"
109+
VALUE "FileVersion", "%.%.0.0"
103110
VALUE "LegalCopyright", "Microsoft Corporation. All rights reserved."
104111
VALUE "OriginalFilename", "cppwinrt.exe"
105112
VALUE "ProductName", "C++/WinRT"
@@ -112,7 +119,10 @@ BEGIN
112119
END
113120
END
114121
)",
115-
CPPWINRT_VERSION_STRING);
122+
ver_major, ver_minor, // FILEVERSION
123+
ver_major, ver_minor, // PRODUCTVERSION
124+
ver_major, ver_minor, // FileVersion string
125+
CPPWINRT_VERSION_STRING); // ProductVersion string
116126

117127
std::filesystem::create_directories(argv[2]);
118128
auto const output = std::filesystem::canonical(argv[2]);

0 commit comments

Comments
 (0)