GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — windows-git-clone-context-menu/scripts/publish.ps1 at main · vycdev/windows-git-clone-context-menu

Expand file tree

/

publish.ps1

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
37 lines (32 loc) · 1.23 KB
/

publish.ps1

Copy path

File metadata and controls

37 lines (32 loc) · 1.23 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[ValidatePattern('^\d+\.\d+\.\d+$')]
[string]$Version
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$repositoryRoot = Split-Path -Parent $PSScriptRoot
Push-Location $repositoryRoot
try {
$declaredVersion = (Get-Content -LiteralPath '.\version.txt' -Raw).Trim()
if ($declaredVersion -ne $Version) {
throw "version.txt contains '$declaredVersion'. Update and commit it as '$Version' first."
}
if (git status --porcelain) {
throw 'The working tree is not clean. Commit the release changes before publishing.'
}
git diff --quiet HEAD
if ($LASTEXITCODE -ne 0) { throw 'The release commit has uncommitted changes.' }
$tag = "v$Version"
git rev-parse --verify --quiet "refs/tags/$tag" | Out-Null
if ($LASTEXITCODE -eq 0) { throw "Tag '$tag' already exists locally." }
git tag -a $tag -m "Git Clone Here $Version"
if ($LASTEXITCODE -ne 0) { throw "Could not create tag '$tag'." }
git push origin $tag
if ($LASTEXITCODE -ne 0) { throw "Could not push tag '$tag'." }
Write-Host "Published $tag. GitHub Actions will build the installer and create the release." -ForegroundColor Green
}
finally {
Pop-Location
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.