@@ -36,63 +36,29 @@ public static bool TryWrite(
3636 <PropertyGroup>
3737 <{ product . ProductNameWithoutDot } MainVersion>{ version . MainVersion } </{ product . ProductNameWithoutDot } MainVersion>" ;
3838
39- var packageVersionWithoutSuffix = version . PatchNumber == 0 ? version . VersionPrefix : version . VersionPrefix + "." + version . PatchNumber ;
40- var assemblyVersion = version . VersionPrefix + "." + version . PatchNumber ;
41- var previewVersionSuffix = configuration == BuildConfiguration . Public ? "preview" : version . VersionSuffix ;
42-
4339 if ( product . GenerateArcadeProperties )
4440 {
4541 // Metalama.Compiler, because of Arcade, requires the version number to be decomposed in a prefix, patch number, and suffix.
4642 // In Arcade, the package naming scheme is different because the patch number is not a part of the package name.
4743
48- var arcadeSuffix = string . IsNullOrEmpty ( version . VersionSuffix ) ? "" : version . VersionSuffix ;
49- var previewArcadeSuffix = previewVersionSuffix ;
50-
51- void AppendToArcadeSuffix ( string s )
52- {
53- arcadeSuffix += s ;
54- previewArcadeSuffix += s ;
55- }
56-
57- if ( version . PatchNumber > 0 )
58- {
59- if ( arcadeSuffix . Length > 0 )
60- {
61- AppendToArcadeSuffix ( "-" ) ;
62- }
63- else
64- {
65- // It should not happen that we have a patch number without a suffix.
66- AppendToArcadeSuffix ( "-patch-" + configuration ) ;
67- }
68-
69- AppendToArcadeSuffix ( version . PatchNumber . ToString ( CultureInfo . InvariantCulture ) ) ;
70- }
71-
72- var packageSuffixWithDash = string . IsNullOrEmpty ( arcadeSuffix ) ? "" : "-" + arcadeSuffix ;
73- var packageVersion = version . VersionPrefix + packageSuffixWithDash ;
74- var packagePreviewVersion = version . VersionPrefix + "-" + previewArcadeSuffix ;
75-
7644 manifestFileContent += $@ "
7745
7846 <{ product . ProductNameWithoutDot } VersionPrefix>{ version . VersionPrefix } </{ product . ProductNameWithoutDot } VersionPrefix>
79- <{ product . ProductNameWithoutDot } VersionSuffix>{ arcadeSuffix } </{ product . ProductNameWithoutDot } VersionSuffix>
47+ <{ product . ProductNameWithoutDot } VersionSuffix>{ version . ArcadeSuffix } </{ product . ProductNameWithoutDot } VersionSuffix>
8048 <{ product . ProductNameWithoutDot } VersionPatchNumber>{ version . PatchNumber } </{ product . ProductNameWithoutDot } VersionPatchNumber>
81- <{ product . ProductNameWithoutDot } VersionWithoutSuffix>{ packageVersionWithoutSuffix } </{ product . ProductNameWithoutDot } VersionWithoutSuffix>
82- <{ product . ProductNameWithoutDot } Version>{ packageVersion } </{ product . ProductNameWithoutDot } Version>
83- <{ product . ProductNameWithoutDot } PreviewVersion>{ packagePreviewVersion } </{ product . ProductNameWithoutDot } PreviewVersion>
84- <{ product . ProductNameWithoutDot } AssemblyVersion>{ assemblyVersion } </{ product . ProductNameWithoutDot } AssemblyVersion>" ;
49+ <{ product . ProductNameWithoutDot } VersionWithoutSuffix>{ version . PackageVersionWithoutSuffix } </{ product . ProductNameWithoutDot } VersionWithoutSuffix>
50+ <{ product . ProductNameWithoutDot } Version>{ version . PackageVersion } </{ product . ProductNameWithoutDot } Version>
51+ <{ product . ProductNameWithoutDot } PreviewVersion>{ version . PackagePreviewVersion } </{ product . ProductNameWithoutDot } PreviewVersion>
52+ <{ product . ProductNameWithoutDot } AssemblyVersion>{ version . AssemblyVersion } </{ product . ProductNameWithoutDot } AssemblyVersion>" ;
8553 }
8654 else
8755 {
8856 var packageSuffix = string . IsNullOrEmpty ( version . VersionSuffix ) ? "" : "-" + version . VersionSuffix ;
89- var packageVersion = packageVersionWithoutSuffix + packageSuffix ;
90- var packagePreviewVersion = packageVersionWithoutSuffix + "-" + previewVersionSuffix ;
9157
9258 manifestFileContent += $@ "
93- <{ product . ProductNameWithoutDot } Version>{ packageVersion } </{ product . ProductNameWithoutDot } Version>
94- <{ product . ProductNameWithoutDot } PreviewVersion>{ packagePreviewVersion } </{ product . ProductNameWithoutDot } PreviewVersion>
95- <{ product . ProductNameWithoutDot } AssemblyVersion>{ assemblyVersion } </{ product . ProductNameWithoutDot } AssemblyVersion>" ;
59+ <{ product . ProductNameWithoutDot } Version>{ version . PackageVersion } </{ product . ProductNameWithoutDot } Version>
60+ <{ product . ProductNameWithoutDot } PreviewVersion>{ version . PackagePreviewVersion } </{ product . ProductNameWithoutDot } PreviewVersion>
61+ <{ product . ProductNameWithoutDot } AssemblyVersion>{ version . AssemblyVersion } </{ product . ProductNameWithoutDot } AssemblyVersion>" ;
9662 }
9763
9864 manifestFileContent += $@ "
0 commit comments