-
Notifications
You must be signed in to change notification settings - Fork 1
New‑SamplerGitHubReleaseTag
Creates a new GitHub release tag for the Sampler project.
New-SamplerGitHubReleaseTag [[-DefaultBranchName] <String>] [[-UpstreamRemoteName] <String>]
[[-ReleaseTag] <String>] [-ReturnToCurrentBranch] [-PushTag] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
The New-SamplerGitHubReleaseTag function creates a new release tag for the Sampler project on GitHub. It performs the following steps:
Checks if the remote specified in $UpstreamRemoteName exists locally and throws an error if it doesn't. 2. Fetches the $DefaultBranchName branch from the $UpstreamRemoteName remote and throws an error if it doesn't exist. 3. Checks out the $DefaultBranchName branch. 4. Fetches the $DefaultBranchName branch from the $UpstreamRemoteName remote. 5. Rebases the local $DefaultBranchName branch with the $UpstreamRemoteName/$DefaultBranchName branch. 6. Gets the last commit ID of the $DefaultBranchName branch. 7. Fetches tags from the $UpstreamRemoteName remote. 8. If no release tag is specified, it checks if there are any tags in the local repository and selects the latest preview tag. 9. Creates a new tag with the specified release tag or based on the latest preview tag. 10. Optionally pushes the tag to the $UpstreamRemoteName remote. 11. Switches back to the previous branch if requested.
New-SamplerGitHubReleaseTag -ReleaseTag 'v1.0.0' -PushTag
Creates a new release tag with the specified tag 'v1.0.0' and pushes it to the 'origin' remote.
New-SamplerGitHubReleaseTag -ReturnToCurrentBranch
Creates a new release tag and switches back to the previous branch.
Specifies the name of the default branch. Default value is 'main'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: Main
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies that the command should run without prompting for confirmation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies that the tag should also be pushed to the upstream remote after creating it. This will always ask for confirmation before pushing the tag, unless Force is also specified.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the release tag to create. Must be in the format 'vX.X.X'. If not specified, the latest preview tag will be used.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies that the command should switches back to the previous branch after creating the release tag.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the name of the upstream remote. Default value is 'origin'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: Origin
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Assert-GitLocalChange
- Assert-GitRemote
- Assert-IPv4Address
- Clear-AnsiSequence
- ConvertTo-AnsiSequence
- ConvertTo-AnsiString
- ConvertTo-DifferenceString
- ConvertTo-RelativePath
- Disable-CursorShortcutCode
- Get-ClassAst
- Get-ClassResourceAst
- Get-GitBranchCommit
- Get-GitLocalBranchName
- Get-GitRemote
- Get-GitRemoteBranch
- Get-GitTag
- Get-LinkLayerAddress
- Get-ModuleByVersion
- Get-ModuleFileSha
- Get-ModuleVersion
- Get-NumericalSequence
- Get-PSReadLineHistory
- Get-TextOffset
- Install-ModulePatch
- Invoke-Git
- Invoke-PesterJob
- New-GitTag
- New-SamplerGitHubReleaseTag
- Out-Difference
- Pop-VMLatestSnapshot
- Push-GitTag
- Receive-GitBranch
- Remove-GitTag
- Remove-History
- Remove-PSHistory
- Remove-PSReadLineHistory
- Rename-GitLocalBranch
- Rename-GitRemote
- Request-GitTag
- Resolve-DnsName
- Resume-GitRebase
- Send-WakeOnLan
- Split-StringAtIndex
- Start-GitRebase
- Stop-GitRebase
- Switch-GitLocalBranch
- Test-FileHash
- Test-GitLocalChanges
- Test-GitRemote
- Test-GitRemoteBranch
- Test-IPv4Address
- Update-GitLocalBranch
- Update-RemoteTrackingBranch