Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase manifest schema version to 1.4 #2451

Merged
merged 1 commit into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "https://aka.ms/winget-manifest.defaultlocale.1.3.0.schema.json",
"$id": "https://aka.ms/winget-manifest.defaultlocale.1.4.0.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.3.0",
"description": "A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.4.0",
"definitions": {
"Url": {
"type": [ "string", "null" ],
Expand Down Expand Up @@ -194,7 +194,7 @@
},
"ManifestVersion": {
"type": "string",
"default": "1.3.0",
"default": "1.4.0",
"pattern": "^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$",
"description": "The manifest syntax version"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "https://aka.ms/winget-manifest.installer.1.3.0.schema.json",
"$id": "https://aka.ms/winget-manifest.installer.1.4.0.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A representation of a single-file manifest representing an app installers in the OWC. v1.3.0",
"description": "A representation of a single-file manifest representing an app installers in the OWC. v1.4.0",
"definitions": {
"PackageIdentifier": {
"type": "string",
Expand Down Expand Up @@ -816,7 +816,7 @@
},
"ManifestVersion": {
"type": "string",
"default": "1.3.0",
"default": "1.4.0",
"pattern": "^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$",
"description": "The manifest syntax version"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "https://aka.ms/winget-manifest.locale.1.3.0.schema.json",
"$id": "https://aka.ms/winget-manifest.locale.1.4.0.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.3.0",
"description": "A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.4.0",
"definitions": {
"Url": {
"type": [ "string", "null" ],
Expand Down Expand Up @@ -189,7 +189,7 @@
},
"ManifestVersion": {
"type": "string",
"default": "1.3.0",
"default": "1.4.0",
"pattern": "^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$",
"description": "The manifest syntax version"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "https://aka.ms/winget-manifest.singleton.1.3.0.schema.json",
"$id": "https://aka.ms/winget-manifest.singleton.1.4.0.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A representation of a single-file manifest representing an app in the OWC. v1.3.0",
"description": "A representation of a single-file manifest representing an app in the OWC. v1.4.0",
"definitions": {
"PackageIdentifier": {
"type": "string",
Expand Down Expand Up @@ -973,7 +973,7 @@
},
"ManifestVersion": {
"type": "string",
"default": "1.3.0",
"default": "1.4.0",
"pattern": "^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$",
"description": "The manifest syntax version"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "https://aka.ms/winget-manifest.version.1.3.0.schema.json",
"$id": "https://aka.ms/winget-manifest.version.1.4.0.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A representation of a multi-file manifest representing an app version in the OWC. v1.3.0",
"description": "A representation of a multi-file manifest representing an app version in the OWC. v1.4.0",
"type": "object",
"properties": {
"PackageIdentifier": {
Expand Down Expand Up @@ -31,7 +31,7 @@
},
"ManifestVersion": {
"type": "string",
"default": "1.3.0",
"default": "1.4.0",
"pattern": "^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$",
"description": "The manifest syntax version"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Installers:
Log: /LogFile <LOGPATH>
InstallLocation: /InstallDir <INSTALLPATH>
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Installers:
NestedInstallerFiles:
- RelativeFilePath: ../../AppInstallerTestExeInstaller.exe
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Installers:
NestedInstallerFiles:
- RelativeFilePath: AppInstallerTestMsiInstaller.msi
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Installers:
NestedInstallerFiles:
- RelativeFilePath: AppInstallerTestMsixInstaller.msix
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
10 changes: 5 additions & 5 deletions src/AppInstallerCLITests/AppInstallerCLITests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@
<CopyFileToFolders Include="TestData\ManifestV1_2-Singleton.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\ManifestV1_3-Singleton.yaml">
<CopyFileToFolders Include="TestData\ManifestV1_4-Singleton.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1\ManifestV1-MultiFile-DefaultLocale.yaml">
Expand Down Expand Up @@ -694,16 +694,16 @@
<CopyFileToFolders Include="TestData\MultiFileManifestV1_2\ManifestV1_2-MultiFile-Version.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_3\ManifestV1_3-MultiFile-DefaultLocale.yaml">
<CopyFileToFolders Include="TestData\MultiFileManifestV1_4\ManifestV1_4-MultiFile-DefaultLocale.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_3\ManifestV1_3-MultiFile-Installer.yaml">
<CopyFileToFolders Include="TestData\MultiFileManifestV1_4\ManifestV1_4-MultiFile-Installer.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_3\ManifestV1_3-MultiFile-Locale.yaml">
<CopyFileToFolders Include="TestData\MultiFileManifestV1_4\ManifestV1_4-MultiFile-Locale.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_3\ManifestV1_3-MultiFile-Version.yaml">
<CopyFileToFolders Include="TestData\MultiFileManifestV1_4\ManifestV1_4-MultiFile-Version.yaml">
<DeploymentContent>true</DeploymentContent>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\Installer_Exe_Dependencies.yaml">
Expand Down
20 changes: 10 additions & 10 deletions src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Filter Include="TestData\MultiFileManifestV1_2">
<UniqueIdentifier>{0215df7f-7a73-4cc0-9589-adf401329e59}</UniqueIdentifier>
</Filter>
<Filter Include="TestData\MultiFileManifestV1_3">
<Filter Include="TestData\MultiFileManifestV1_4">
<UniqueIdentifier>{52b26063-ccff-40ae-a420-243327dcca25}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\CLI">
Expand Down Expand Up @@ -630,7 +630,7 @@
<CopyFileToFolders Include="TestData\ManifestV1_2-Singleton.yaml">
<Filter>TestData</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\ManifestV1_3-Singleton.yaml">
<CopyFileToFolders Include="TestData\ManifestV1_4-Singleton.yaml">
<Filter>TestData</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1\ManifestV1-MultiFile-DefaultLocale.yaml">
Expand Down Expand Up @@ -669,17 +669,17 @@
<CopyFileToFolders Include="TestData\MultiFileManifestV1_2\ManifestV1_2-MultiFile-Version.yaml">
<Filter>TestData\MultiFileManifestV1_2</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_3\ManifestV1_3-MultiFile-DefaultLocale.yaml">
<Filter>TestData\MultiFileManifestV1_3</Filter>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_4\ManifestV1_4-MultiFile-DefaultLocale.yaml">
<Filter>TestData\MultiFileManifestV1_4</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_3\ManifestV1_3-MultiFile-Installer.yaml">
<Filter>TestData\MultiFileManifestV1_3</Filter>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_4\ManifestV1_4-MultiFile-Installer.yaml">
<Filter>TestData\MultiFileManifestV1_4</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_3\ManifestV1_3-MultiFile-Locale.yaml">
<Filter>TestData\MultiFileManifestV1_3</Filter>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_4\ManifestV1_4-MultiFile-Locale.yaml">
<Filter>TestData\MultiFileManifestV1_4</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_3\ManifestV1_3-MultiFile-Version.yaml">
<Filter>TestData\MultiFileManifestV1_3</Filter>
<CopyFileToFolders Include="TestData\MultiFileManifestV1_4\ManifestV1_4-MultiFile-Version.yaml">
<Filter>TestData\MultiFileManifestV1_4</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="TestData\Installer_Exe_Dependencies.yaml">
<Filter>TestData</Filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Installers:
Silent: /silence
Update: /update
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Installers:
Silent: /silence
Update: /update
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Installers:
- RelativeFilePath: installerOne.exe
- RelativeFilePath: installerTwo.exe
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Installers:
Silent: /silence
Update: /update
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Installers:
NestedInstallerFiles:
- RelativeFilePath: ../../relativeFilePath
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Installers:
NestedInstallerFiles:
- PortableCommandAlias: portableCommandAlias
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Installers:
- RelativeFilePath: relativeFilePath2
PortableCommandAlias: portableCommandAlias2
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Installers:
InstallerSha256: 65DB2F2AC2686C7F2FD69D4A4C6683B888DC55BFA20A0E32CA9F838B51689A3B
NestedInstallerType: exe
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Installers:
- RelativeFilePath: relativeFilePath
PortableCommandAlias: portableCommandAlias
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@ Installers:
ReturnResponse: custom
ReturnResponseUrl: https://defaultReturnResponseUrl.com
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Agreements:
Agreement: DefaultText
AgreementUrl: https://DefaultAgreementUrl.net
ManifestType: defaultLocale
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@ Installers:
InvocationParameter: "/arg2"
DisplayName: "DisplayName2"
ManifestType: installer
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Documentations:
- DocumentLabel: Default document label
DocumentUrl: https://DefaultDocumentUrl.com
ManifestType: locale
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ PackageIdentifier: microsoft.msixsdk
PackageVersion: 1.7.32
DefaultLocale: en-US
ManifestType: version
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Installers:
Silent: /silence
Update: /update
ManifestType: singleton
ManifestVersion: 1.3.0
ManifestVersion: 1.4.0
26 changes: 13 additions & 13 deletions src/AppInstallerCLITests/YamlManifest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ void VerifyV1ManifestContent(const Manifest& manifest, bool isSingleton, Manifes
REQUIRE(manifest.DefaultInstallerInfo.UnsupportedArguments.at(0) == UnsupportedArgumentEnum::Log);
}

if (manifestVer >= ManifestVer{ s_ManifestVersionV1_3 })
if (manifestVer >= ManifestVer{ s_ManifestVersionV1_4 })
{
REQUIRE(manifest.DefaultInstallerInfo.NestedInstallerType == InstallerTypeEnum::Msi);
REQUIRE(manifest.DefaultInstallerInfo.NestedInstallerFiles.size() == 1);
Expand All @@ -515,7 +515,7 @@ void VerifyV1ManifestContent(const Manifest& manifest, bool isSingleton, Manifes
}
else
{
if (manifestVer >= ManifestVer{ s_ManifestVersionV1_3 })
if (manifestVer >= ManifestVer{ s_ManifestVersionV1_4 })
{
REQUIRE(manifest.Installers.size() == 4);
}
Expand Down Expand Up @@ -591,7 +591,7 @@ void VerifyV1ManifestContent(const Manifest& manifest, bool isSingleton, Manifes
REQUIRE(installer1.UnsupportedArguments.at(0) == UnsupportedArgumentEnum::Location);
}

if (manifestVer >= ManifestVer{ s_ManifestVersionV1_3 })
if (manifestVer >= ManifestVer{ s_ManifestVersionV1_4 })
{
// NestedInstaller metadata should not be populated unless the InstallerType is zip.
REQUIRE(installer1.NestedInstallerType == InstallerTypeEnum::Unknown);
Expand Down Expand Up @@ -653,7 +653,7 @@ void VerifyV1ManifestContent(const Manifest& manifest, bool isSingleton, Manifes
REQUIRE(installer3.UnsupportedArguments.at(0) == UnsupportedArgumentEnum::Log);
}

if (manifestVer >= ManifestVer{ s_ManifestVersionV1_3 })
if (manifestVer >= ManifestVer{ s_ManifestVersionV1_4 })
{
ManifestInstaller installer4 = manifest.Installers.at(3);
REQUIRE(installer4.BaseInstallerType == InstallerTypeEnum::Zip);
Expand Down Expand Up @@ -790,29 +790,29 @@ TEST_CASE("ValidateV1_2GoodManifestAndVerifyContents", "[ManifestValidation]")
VerifyV1ManifestContent(mergedManifest, false, ManifestVer{ s_ManifestVersionV1_2 });
}

TEST_CASE("ValidateV1_3GoodManifestAndVerifyContents", "[ManifestValidation]")
TEST_CASE("ValidateV1_4GoodManifestAndVerifyContents", "[ManifestValidation]")
{
ManifestValidateOption validateOption;
validateOption.FullValidation = true;
TempDirectory singletonDirectory{ "SingletonManifest" };
CopyTestDataFilesToFolder({ "ManifestV1_3-Singleton.yaml" }, singletonDirectory);
CopyTestDataFilesToFolder({ "ManifestV1_4-Singleton.yaml" }, singletonDirectory);
Manifest singletonManifest = YamlParser::CreateFromPath(singletonDirectory, validateOption);
VerifyV1ManifestContent(singletonManifest, true, ManifestVer{ s_ManifestVersionV1_3 });
VerifyV1ManifestContent(singletonManifest, true, ManifestVer{ s_ManifestVersionV1_4 });

TempDirectory multiFileDirectory{ "MultiFileManifest" };
CopyTestDataFilesToFolder({
"ManifestV1_3-MultiFile-Version.yaml",
"ManifestV1_3-MultiFile-Installer.yaml",
"ManifestV1_3-MultiFile-DefaultLocale.yaml",
"ManifestV1_3-MultiFile-Locale.yaml" }, multiFileDirectory);
"ManifestV1_4-MultiFile-Version.yaml",
"ManifestV1_4-MultiFile-Installer.yaml",
"ManifestV1_4-MultiFile-DefaultLocale.yaml",
"ManifestV1_4-MultiFile-Locale.yaml" }, multiFileDirectory);

TempFile mergedManifestFile{ "merged.yaml" };
Manifest multiFileManifest = YamlParser::CreateFromPath(multiFileDirectory, validateOption, mergedManifestFile);
VerifyV1ManifestContent(multiFileManifest, false, ManifestVer{ s_ManifestVersionV1_3 });
VerifyV1ManifestContent(multiFileManifest, false, ManifestVer{ s_ManifestVersionV1_4 });

// Read from merged manifest should have the same content as multi file manifest
Manifest mergedManifest = YamlParser::CreateFromPath(mergedManifestFile);
VerifyV1ManifestContent(mergedManifest, false, ManifestVer{ s_ManifestVersionV1_3 });
VerifyV1ManifestContent(mergedManifest, false, ManifestVer{ s_ManifestVersionV1_4 });
}

YamlManifestInfo CreateYamlManifestInfo(std::string testDataFile)
Expand Down
Loading