diff --git a/CHANGELOG.md b/CHANGELOG.md index 991a96a..bab751d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.6.1 + +- added validation on field `publisher` that required when settings `sign_msix: false` ([#126](https://github.com/YehudaKremer/msix/issues/126)) + ## 3.6.0 - added [apps for websites](https://docs.microsoft.com/en-us/windows/uwp/launch-resume/web-to-app-linking) ([#125](https://github.com/YehudaKremer/msix/pull/125)) diff --git a/README.md b/README.md index 3fc8dda..dda1a4f 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ See [Configurations Examples And Use Cases]. | `certificate_password` | `--certificate-password` `-p` | Password for the certificate. | `1234` | | `publisher` | `--publisher` `-b` | The `Subject` value in the certificate. | `CN=BF212345-5644-46DF-8668-014043C1B138` or `CN=Contoso Software, O=Contoso Corporation, C=US` | | `signtool_options` | `--signtool-options` | Options to be provided to the `signtool` for app signing (see below.) | `/v /fd SHA256 /f C:/Users/me/Desktop/my.cer` | -| `sign_msix` | `--sign-msix ` | If `false`, don't sign the msix file, default is `true`. | `true` | +| `sign_msix` | `--sign-msix ` | If `false`, don't sign the msix file, default is `true`.
Note: when **false**, `publisher` is Required. | `true` | | `install_certificate` | `--install-certificate ` | If `false`, don't try to install the certificate, default is `true`. | `true` | diff --git a/example/README.md b/example/README.md index 3a8c6b9..d262b25 100644 --- a/example/README.md +++ b/example/README.md @@ -45,6 +45,14 @@ msix_config: ``` Note: The main app version will be used as a basis for the MSIX version (`1.3.2` to `1.3.2.0`) +###### Without signing + +```yaml +msix_config: + publisher: CN=PublisherName, O=Msix Testing... # required + sign_msix: false +``` + ###### With Metadata: ```yaml diff --git a/lib/src/configuration.dart b/lib/src/configuration.dart index 8b00828..d094d26 100644 --- a/lib/src/configuration.dart +++ b/lib/src/configuration.dart @@ -195,6 +195,11 @@ class Configuration { publisherName = identityName; } } + if (signMsix == false && publisher.isNullOrEmpty) { + _logger.stderr( + 'when sign_msix is false, you must provide the publisher value at "msix_config: publisher" in the pubspec.yaml file'); + exit(-1); + } if (store && publisher.isNullOrEmpty) { _logger.stderr( 'publisher is empty, check "msix_config: publisher" at pubspec.yaml'); diff --git a/pubspec.yaml b/pubspec.yaml index 425fe43..b9bad2c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: msix description: A command-line tool that create Msix installer from your flutter windows-build files. -version: 3.6.0 +version: 3.6.1 maintainer: Yehuda Kremer (yehudakremer@gmail.com) homepage: https://github.com/YehudaKremer/msix