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

Allow Opt-In to change the default to Release for Pack/Pub #25991

Merged
merged 23 commits into from
Jun 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9f68df6
test change in properties, invalid [wip]
nagilson Jun 9, 2022
ae00a9e
Revert "test change in properties, invalid [wip]"
nagilson Jun 9, 2022
90fe721
valid ms build logic but value is not propagating
nagilson Jun 10, 2022
86c5197
Some testing, pushing for access on another device
nagilson Jun 13, 2022
529e599
Update translation strings
nagilson Jun 13, 2022
1ebb505
Code Cleanup
nagilson Jun 13, 2022
8d1b62e
Separate into two variables for release control
nagilson Jun 13, 2022
2159be9
Fix small error
nagilson Jun 13, 2022
b36d62f
Fix roughly 50 tests to expect publish and pack to use release. Still…
nagilson Jun 17, 2022
d0ee3d7
Merge remote-tracking branch 'upstream/main' into nagilson-papurelease2
nagilson Jun 17, 2022
72cbfb5
Add some tests and changes to the default behavior of publish / pack …
nagilson Jun 22, 2022
6241d52
Fix some more tests
nagilson Jun 22, 2022
a81c83d
Remove release from test now that its opt in
nagilson Jun 22, 2022
5557605
Code changes requested
nagilson Jun 23, 2022
81a02a9
Include isPublishing and isPacking information from the CLI to MSBuild
nagilson Jun 23, 2022
443bfbf
Use more specific language in documentation
nagilson Jun 23, 2022
eb946b3
Use more specific language in documentation
nagilson Jun 23, 2022
3a6757e
Update tests to new publishing command
nagilson Jun 24, 2022
88e5ea3
Restore .Publish.Targets to original state
nagilson Jun 24, 2022
773fe05
Merge branch 'nagilson-papurelease2' of https://github.com/nagilson/s…
nagilson Jun 24, 2022
7986efe
Add translation requests to xlf
nagilson Jun 24, 2022
a6429f9
Update tests to check files instead of output, as per PR Feedback
nagilson Jun 24, 2022
089698a
Use OS independent file path lookups
nagilson Jun 24, 2022
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
4 changes: 2 additions & 2 deletions src/Cli/dotnet/commands/dotnet-pack/LocalizableStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@
<value>The project to pack, defaults to the project file in the current directory. Can be a path to any project file</value>
</data>
<data name="ConfigurationOptionDescription" xml:space="preserve">
<value>The configuration to use for building the package. The default for most projects is 'Debug'.</value>
<value>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</value>
</data>
<data name="CmdNoLogo" xml:space="preserve">
<value>Do not display the startup banner or the copyright message.</value>
</data>
</root>
</root>
3 changes: 2 additions & 1 deletion src/Cli/dotnet/commands/dotnet-pack/PackCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public static PackCommand FromParseResult(ParseResult parseResult, string msbuil

var msbuildArgs = new List<string>()
{
"-target:pack"
"-target:pack",
"-property:_IsPacking=true"
};

msbuildArgs.AddRange(parseResult.OptionValuesToBeForwarded(PackCommandParser.GetCommand()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">Konfigurace použitá k sestavení balíčku. Výchozí možností pro většinu projektů je Debug.</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Konfigurace použitá k sestavení balíčku. Výchozí možností pro většinu projektů je Debug.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">Die für die Paketerstellung zu verwendende Konfiguration. Standard für die meisten Projekte ist "Debug".</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Die für die Paketerstellung zu verwendende Konfiguration. Standard für die meisten Projekte ist "Debug".</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">La configuración que se usará para compilar el paquete. El valor predeterminado para la mayoría de los proyectos es "Debug".</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">La configuración que se usará para compilar el paquete. El valor predeterminado para la mayoría de los proyectos es "Debug".</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">Configuration à utiliser pour la génération du package. La valeur par défaut pour la plupart des projets est 'Debug'.</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Configuration à utiliser pour la génération du package. La valeur par défaut pour la plupart des projets est 'Debug'.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">Configurazione da usare per compilare il pacchetto. L'impostazione predefinita per la maggior parte dei progetti è 'Debug'.</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Configurazione da usare per compilare il pacchetto. L'impostazione predefinita per la maggior parte dei progetti è 'Debug'.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">パッケージのビルドに使用する構成。ほとんどのプロジェクトで既定は 'Debug' です。</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">パッケージのビルドに使用する構成。ほとんどのプロジェクトで既定は 'Debug' です。</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">패키지 빌드에 사용할 구성입니다. 대부분의 프로젝트에서 기본값은 'Debug'입니다.</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">패키지 빌드에 사용할 구성입니다. 대부분의 프로젝트에서 기본값은 'Debug'입니다.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">Konfiguracja do użycia na potrzeby kompilacji pakietu. W przypadku większości projektów ustawienie domyślne to „Debugowanie”.</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Konfiguracja do użycia na potrzeby kompilacji pakietu. W przypadku większości projektów ustawienie domyślne to „Debugowanie”.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">A configuração a ser usada para compilar o pacote. O padrão para a maioria dos projetos é 'Debug'.</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">A configuração a ser usada para compilar o pacote. O padrão para a maioria dos projetos é 'Debug'.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">Конфигурация, используемая для сборки пакета. По умолчанию для большинства проектов используется "Debug".</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Конфигурация, используемая для сборки пакета. По умолчанию для большинства проектов используется "Debug".</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">Paketi derlemek için kullanılacak yapılandırma. Çoğu proje için varsayılan, ‘Hata Ayıklama’ seçeneğidir.</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Paketi derlemek için kullanılacak yapılandırma. Çoğu proje için varsayılan, ‘Hata Ayıklama’ seçeneğidir.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">用于生成包的配置。大多数项目的默认值是 "Debug"。</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">用于生成包的配置。大多数项目的默认值是 "Debug"。</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default for most projects is 'Debug'.</source>
<target state="translated">要用於建置套件的組態。大部分的專案預設為「偵錯」。</target>
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">要用於建置套件的組態。大部分的專案預設為「偵錯」。</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
The default is to publish a framework-dependent application.</value>
</data>
<data name="ConfigurationOptionDescription" xml:space="preserve">
<value>The configuration to publish for. The default for most projects is 'Debug'.</value>
<value>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</value>
</data>
<data name="CmdNoLogo" xml:space="preserve">
<value>Do not display the startup banner or the copyright message.</value>
Expand Down
9 changes: 5 additions & 4 deletions src/Cli/dotnet/commands/dotnet-publish/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ public static PublishCommand FromArgs(string[] args, string msbuildPath = null)
public static PublishCommand FromParseResult(ParseResult parseResult, string msbuildPath = null)
{
parseResult.HandleDebugSwitch();

var msbuildArgs = new List<string>();

parseResult.ShowHelpOrErrorIfAppropriate();

msbuildArgs.Add("-target:Publish");
var msbuildArgs = new List<string>()
{
"-target:Publish",
"-property:_IsPublishing=true"
};

CommonOptions.ValidateSelfContainedOptions(parseResult.HasOption(PublishCommandParser.SelfContainedOption),
parseResult.HasOption(PublishCommandParser.NoSelfContainedOption));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Ve výchozím nastavení je publikována aplikace závislá na architektuře.</t
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default for most projects is 'Debug'.</source>
<target state="translated">Konfigurace pro publikování. Výchozí možností pro většinu projektů je Debug.</target>
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Konfigurace pro publikování. Výchozí možností pro většinu projektů je Debug.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Standardmäßig wird eine Framework-abhängige Anwendung veröffentlicht.</targe
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default for most projects is 'Debug'.</source>
<target state="translated">Die Konfiguration für die Veröffentlichung. Der Standardwert für die meisten Projekte ist "Debug".</target>
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Die Konfiguration für die Veröffentlichung. Der Standardwert für die meisten Projekte ist "Debug".</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ El valor predeterminado es publicar una aplicación dependiente del marco.</targ
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default for most projects is 'Debug'.</source>
<target state="translated">La configuración para la que se publica. El valor predeterminado para la mayoría de los proyectos es "Debug".</target>
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">La configuración para la que se publica. El valor predeterminado para la mayoría de los proyectos es "Debug".</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ La valeur par défaut est de publier une application dépendante du framework.</
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default for most projects is 'Debug'.</source>
<target state="translated">Configuration pour laquelle la publication est effectuée. La valeur par défaut pour la plupart des projets est 'Debug'.</target>
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Configuration pour laquelle la publication est effectuée. La valeur par défaut pour la plupart des projets est 'Debug'.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Per impostazione predefinita, viene generato un pacchetto dipendente dal framewo
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default for most projects is 'Debug'.</source>
<target state="translated">Configurazione per cui eseguire la pubblicazione. L'impostazione predefinita per la maggior parte dei progetti è 'Debug'.</target>
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Configurazione per cui eseguire la pubblicazione. L'impostazione predefinita per la maggior parte dei progetti è 'Debug'.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ The default is to publish a framework-dependent application.</source>
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default for most projects is 'Debug'.</source>
<target state="translated">公開する対象の構成。大部分のプロジェクトで、既定値は 'Debug' です。</target>
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">公開する対象の構成。大部分のプロジェクトで、既定値は 'Debug' です。</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ The default is to publish a framework-dependent application.</source>
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default for most projects is 'Debug'.</source>
<target state="translated">게시할 구성입니다. 대부분의 프로젝트에서 기본값은 'Debug'입니다.</target>
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">게시할 구성입니다. 대부분의 프로젝트에서 기본값은 'Debug'입니다.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Domyślnie publikowana jest aplikacja zależna od struktury.</target>
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default for most projects is 'Debug'.</source>
<target state="translated">Konfiguracja, dla której ma być wykonane publikowanie. W przypadku większości projektów ustawienie domyślne to „Debugowanie”.</target>
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">Konfiguracja, dla której ma być wykonane publikowanie. W przypadku większości projektów ustawienie domyślne to „Debugowanie”.</target>
<note />
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ O padrão é publicar uma aplicação dependente de framework.</target>
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default for most projects is 'Debug'.</source>
<target state="translated">A configuração para a qual a publicação ocorrerá. O padrão para a maioria dos projetos é 'Debug'.</target>
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="needs-review-translation">A configuração para a qual a publicação ocorrerá. O padrão para a maioria dos projetos é 'Debug'.</target>
<note />
</trans-unit>
</body>
Expand Down
Loading