-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from Zhaopudark/dev
Prepare for publish
- Loading branch information
Showing
8 changed files
with
48 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This script file is for local machine only, without considering any configuration or installation. | ||
$ErrorActionPreference = 'Stop' | ||
$root_path = (Get-Item "${PSScriptRoot}/..").FullName | ||
Import-Module "${root_path}/Module/PSComputerManagementZp.psm1" -Force -Scope Local | ||
$release_note_path = "${root_path}/RELEASE.md" | ||
|
||
# check release version | ||
$release_version = $ModuleSettings.ModuleVersion+$ModuleSettings.Prerelease | ||
python "${PSScriptRoot}/check_release_version.py" $release_version $release_note_path | ||
if ($LastExitCode -ne 0){ | ||
throw "The release version in $release_note_path is not consistent with the given version in ${root_path}/Module/PSComputerManagementZp.psm1." | ||
} | ||
return $release_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
$version = . "${PSScriptRoot}/check_release_version.ps1" | ||
$tagName = "v${version}" | ||
|
||
# 检测标签是否存在 | ||
if (git show-ref "refs/tags/$tagName") { | ||
Write-Error "Tag '$tagName' already exists." | ||
} else { | ||
# 标签不存在 | ||
Write-Output "Tag '$tagName' does not exist." | ||
Write-Output "Creating tag '$tagName'." | ||
git tag -a $tagName -m "Release $tagName" | ||
} | ||
|
||
# 检测远程标签是否存在 | ||
if (git ls-remote --tags origin | Where-Object { $_ -match "refs/tags/$tagName" }) { | ||
Write-Error "Remote tag '$tagName' already exists." | ||
} else { | ||
# 远程标签不存在 | ||
Write-Output "Remote tag '$tagName' does not exist." | ||
Write-Output "Pushing tag '$tagName' to remote." | ||
git push origin $tagName | ||
} | ||
|