Publish-DevartDatabaseProject

Synopsis

Publishes DatabaseProject as a NuGet package to a NuGet repository.

Description

This cmdlet publishes a database project to a NuGet repository.

Syntax

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

Parameters

-Project

Specifies an 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.

-Project <object>
Property Default value
Required True
Position Named
Default value -
Accept pipeline input False
Accept wildcard characters False

-Repository

Specifies the NuGet feed where the database build artifact will be published. The value must be a valid URL or a local path to a NuGet feed.

-Repository <string>
Property Default value
Required True
Position Named
Default value -
Accept pipeline input False
Accept wildcard characters False

-ApiKey

Specifies the API key to authenticate deployment requests to a NuGet repository. The API key serves as an alias for the user account and is shared across all NuGet repositories within the repository manager.

-ApiKey <string>
Property Default value
Required False
Position Named
Default value -
Accept pipeline input False
Accept wildcard characters False

-AutoIncrementVersion

Increments a package version if a package with the specified version already exists on the NuGet repository. This parameter is ignored if the project isn’t a DatabaseProject object.

-AutoIncrementVersion <SwitchParameter>
Property Default value
Required False
Position Named
Default value False
Accept pipeline input False
Accept wildcard characters False

Common parameters

<CommonParameters>

This cmdlet supports these common parameters:

  • Verbose – Provides detailed output about the command operation.
  • Debug – Provides debugging information.
  • ErrorAction – Specifies how to respond to errors.
  • ErrorVariable – Stores error messages in a variable.
  • WarningAction – Specifies how to respond to warnings.
  • WarningVariable – Stores warning messages in a variable.
  • InformationAction – Specifies how informational messages are handled.
  • InformationVariable – Stores informational messages in a variable.
  • OutBuffer – Controls the number of objects buffered before output.
  • PipelineVariable – Stores the current pipeline object in a variable.
  • OutVariable – Stores output objects in a variable.

For more information, see About Common Parameters.

Output

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

System.Boolean returns:

  • true if the operation was successful.
  • false if the operation failed.

Examples

---------- 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