diff --git a/doc/Package.md b/doc/Package.md index 62a93fe..52f88b2 100644 --- a/doc/Package.md +++ b/doc/Package.md @@ -9,15 +9,14 @@ in the root of your Unreal project. Please see the [Package Config File docs](Pa for a full description of this file. ``` - ue-package.ps1 [-src:sourcefolder] [-major|-minor|-patch|-hotfix] [-keepversion] [-force] [-variant=VariantName] [-test] [-dryrun] + ue-package.ps1 [-src:sourcefolder] [-major|-minor|-patch|-hotfix] [-keepversion] [-variant=VariantName] [-test] [-dryrun] -src : Source folder (current folder if omitted), must contain packageconfig.json -major : Increment major version i.e. [x++].0.0.0 -minor : Increment minor version i.e. x.[x++].0.0 -patch : Increment patch version i.e. x.x.[x++].0 (default) -hotfix : Increment hotfix version i.e. x.x.x.[x++] - -keepversion : Keep current version number, doesn't tag unless -forcetag - -forcetag : Move any existing version tag + -keepversion : Keep current version number, doesn't tag -variants Name1,Name2,Name3 : Build only named variants instead of DefaultVariants from packageconfig.json -test : Testing mode, separate builds, allow dirty working copy diff --git a/doc/PluginPackage.md b/doc/PluginPackage.md index b44a7e8..a8cce12 100644 --- a/doc/PluginPackage.md +++ b/doc/PluginPackage.md @@ -20,8 +20,7 @@ Usage: -minor : Increment minor version i.e. x.[x++].0.0 -patch : Increment patch version i.e. x.x.[x++].0 (default) -hotfix : Increment hotfix version i.e. x.x.x.[x++] - -keepversion : Keep current version number, doesn't tag unless -forcetag - -forcetag : Move any existing version tag + -keepversion : Keep current version number, doesn't tag -notag : Don't tag even if updating version -test : Testing mode, separate builds, allow dirty working copy -browse : After packaging, browse the output folder diff --git a/ue-package.ps1 b/ue-package.ps1 index e9fbf21..12372ed 100644 --- a/ue-package.ps1 +++ b/ue-package.ps1 @@ -11,8 +11,6 @@ param ( [switch]$hotfix = $false, # Don't incrememnt version [switch]$keepversion = $false, - # Force move tag - [switch]$forcetag = $false, # Name of variant to build (optional, uses DefaultVariants from packageconfig.json if unspecified) [array]$variants, # Testing mode; skips clean checks, tags @@ -43,7 +41,6 @@ function Write-Usage { Write-Output " -patch : Increment patch version i.e. x.x.[x++].0 (default)" Write-Output " -hotfix : Increment hotfix version i.e. x.x.x.[x++]" Write-Output " -keepversion : Keep current version number, doesn't tag unless -forcetag" - Write-Output " -forcetag : Move any existing version tag" Write-Output " -variants Name1,Name2,Name3" Write-Output " : Build only named variants instead of DefaultVariants from packageconfig.json" Write-Output " -test : Testing mode, separate builds, allow dirty working copy" @@ -199,14 +196,11 @@ try { # For tagging release # We only need to grab the main version once - if ((-not $keepversion) -or $forcetag) { - $forcearg = "" - if ($forcetag) { - $forcearg = "-f" - } + if (-not $keepversion) { + if (-not $test -and -not $dryrun -and $isGit) { if ($src -ne ".") { Push-Location $src } - git tag $forcearg -a $versionNumber -m "Automated release tag" + git tag -a $versionNumber -m "Automated release tag" if ($LASTEXITCODE -ne 0) { Exit $LASTEXITCODE } if ($src -ne ".") { Pop-Location } } diff --git a/ue-plugin-package.ps1 b/ue-plugin-package.ps1 index dc9a795..c6b14ad 100644 --- a/ue-plugin-package.ps1 +++ b/ue-plugin-package.ps1 @@ -11,8 +11,6 @@ param ( [switch]$hotfix = $false, # Don't incrememnt version [switch]$keepversion = $false, - # Force move tag - [switch]$forcetag = $false, # Never tag [switch]$notag = $false, # Testing mode; skips clean checks, tags @@ -43,7 +41,6 @@ function Write-Usage { Write-Output " -patch : Increment patch version i.e. x.x.[x++].0 (default)" Write-Output " -hotfix : Increment hotfix version i.e. x.x.x.[x++]" Write-Output " -keepversion : Keep current version number, doesn't tag unless -forcetag" - Write-Output " -forcetag : Move any existing version tag" Write-Output " -notag : Don't tag even if updating version" Write-Output " -test : Testing mode, separate builds, allow dirty working copy" Write-Output " -browse : After packaging, browse the output folder" @@ -158,14 +155,11 @@ try { # For tagging release # We only need to grab the main version once - if ((-not ($keepversion -or $notag)) -or $forcetag) { - $forcearg = "" - if ($forcetag) { - $forcearg = "-f" - } + if (-not ($keepversion -or $notag)) { + if (-not $test -and -not $dryrun -and $isGit) { if ($src -ne ".") { Push-Location $src } - git tag $forcearg -a $versionNumber -m "Automated release tag" + git tag -a $versionNumber -m "Automated release tag" if ($LASTEXITCODE -ne 0) { Exit $LASTEXITCODE } if ($src -ne ".") { Pop-Location } }