Publishes DatabaseProject as a NuGet package to a NuGet repository.
If the AutoIncrementVersion parameter is set to true and the latest version of the NuGet package is greater than or equal to the specified version, the latest version will be incremented; otherwise, the specified version will be used.
Publish-DevartDatabaseProject -Project <object> -Repository <string> [-ApiKey <string>] [-AutoIncrementVersion <SwitchParameter>] [<CommonParameters>]
-Project <object>
Instance of a DatabaseProject object to be published or a package file name. This object is produced by the Invoke-DevartDatabaseBuild and Set-DevartPackageInfo cmdlets.
Required? true
Position? named
Default value
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
Default value
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
Default value
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, InformationAction, InformationVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters.
System.Boolean (returns true on success and false otherwise)
---------- EXAMPLE 1 ----------
Set-DevartPackageInfo -Project $databaseProject -Id Devart.DbForge.DevOpsAutomation.ScriptFolder -Version 1.0.0
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