We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c40d95 commit 747e35cCopy full SHA for 747e35c
polygon.ps1
@@ -1,8 +1,13 @@
1
$cwd = (Get-Location).Path;
2
3
+# Check for environment variable GITHUB_REF.
4
+$latestTag = if (-not (Test-Path -Path "Variable:\GITHUB_REF")) {
5
+ (git describe --tags --abbrev=0);
6
+} else {
7
+ $env:GITHUB_REF
8
+}
9
+
10
# Get the latest version from tag
-git pull origin main;
-$latestTag = git describe --tags --abbrev=0;
11
$versionNumber = (Select-String -Pattern "\d+\.\d+\.\d+" -InputObject $latestTag).Matches[0].Value
12
13
Write-Host "Building Polygon version $versionNumber" -ForegroundColor Green;
0 commit comments