Publish-DevartDatabaseProject

Synopsis

Publish DatabaseProject as NuGet package to the NuGet repository.

Description

The cmdlet creates an object that represents the project from a path.

Syntax

Publish-DevartDatabaseProject -Project <DatabaseProject> -Repository <string> [-ApiKey <string>] [-AutoIncrementVersion <SwitchParameter>] [<CommonParameters>]

Description

If AutoIncrementVersion parameter is set to true and the latest version of NuGet package greater of equal the specified version - the latest version will be incremented; otherwise the specified version will be used.

Parameters

-Project <DatabaseProject>

Instance of a DatabaseProject object to be published. This object is produced by the Invoke-DevartDatabaseBuild and Set-DevartPackageInfo cmdlets.

Required? true

Position? named

Accept pipeline input? false

Accept wildcard characters? false

-Repository <string>

NuGet feed that the database build artifact will be published to. It must be a valid URL or local path to a NuGet feed.

Required? true

Position? named

Accept pipeline input? false

Accept wildcard characters? false

-ApiKey <string>

In order to authenticate a client against a NuGet repository, NuGet uses an API key for deployment requests.

The API key is acts as an alias for the user account, so the same API key is used for all NuGet repositories within the repository manager.

Required? false

Position? named

Accept pipeline input? false

Accept wildcard characters? false

-AutoIncrementVersion <SwitchParameter>

Use this parameter to auto increment package version if a package with the specified version already exists on the NuGet repository. This parameter will be ignored if the Project is not an object of the DatabaseProject.

Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters.

Outputs

System.Boolean (returns true on success and false otherwise)

Examples

---------- EXAMPLE 1 ----------
Set-DevartPackageInfo -Project $databaseProject -Id Devart.DbForge.DevOpsAutomation.ScriptFolder -Version 1.0.0-beta
Publish-DevartDatabaseProject -Project $databaseProject -Repository C:/NuGetRepository -AutoIncrementVersion
---------- EXAMPLE 2 ----------
Publish-DevartDatabaseProject -Project "C:/Test/Test.DevOpsAutomation.Database.3.0.9.nupkg" -Repository C:/NuGetRepository