Skip to content

Commit

Permalink
Merge pull request #25991 from nagilson/nagilson-papurelease2
Browse files Browse the repository at this point in the history
Allow Opt-In to change the default to Release for Pack/Pub
  • Loading branch information
nagilson committed Jun 25, 2022
2 parents 454c4bf + 089698a commit 8b06223
Show file tree
Hide file tree
Showing 38 changed files with 196 additions and 81 deletions.
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

0 comments on commit 8b06223

Please sign in to comment.