Skip to content

Commit

Permalink
Fix describe call when there are no additional commits. Fix readme li…
Browse files Browse the repository at this point in the history
…nks. Prepare new release.
  • Loading branch information
tmatijevich committed Apr 10, 2022
1 parent bd088d7 commit 9d7c788
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion BuildVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ if($LASTEXITCODE -ne 0) {
$Version = "None"
}
else {
$Describe = git -C $args[0] describe --tags 2> $Null
$Describe = git -C $args[0] describe --tags --long 2> $Null
if($Describe.Replace($Tag,"").Split("-").Length -ne 3) {
Write-Warning "BuildVersion: Git describe is unable to determine # of additional commits"
$AdditionalCommits = 0
Expand Down
2 changes: 1 addition & 1 deletion Package.pkg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Package xmlns="http://br-automation.co.at/AS/Package">
<Package Version="0.00.2" xmlns="http://br-automation.co.at/AS/Package">
<Objects>
<Object Type="Program" Language="IEC" Description="Version information">BuildVer</Object>
<Object Type="File" Description="Structure declarations">BuildVersion.typ</Object>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ Upon successful installation, users will see BuildVersion messages in the output
> The argument "C:\projects\MyProject\Logical\BuildVersion\BuildVersion.ps1" to the -File parameter does not exist.
- Possible cause: The pre-build event was created but the BuildVersion package was not added to the project.
- *Remedy*: Follow the [installation](#installation) to add existing package to the project.
- *Remedy*: Follow the [installation](#installation) instructions to add existing package to the project.
- Possible cause: The pre-build event created but does not point to the BuildVersion package.
- *Remedy*: Update the [pre-build field's](#pre-build-field) script path `$(WIN32_AS_PROJECT_PATH)\Logical\BuildVersion\BuildVersion.ps1` to match the path in the project
- *Remedy*: Update the [pre-build field's](#2-create-pre-build-event) script path `$(WIN32_AS_PROJECT_PATH)\Logical\BuildVersion\BuildVersion.ps1` to match the path in the project

> Object "C:\projects\MyProject\Logical\BuildVersion\BuildVer\Variable.var" doesn't exist.
- Possible cause: The BuildVersion package was added to the project, but the pre-build event was not created.
- *Remedy*: Follow the [installation](#installation) instructions to create the pre-build event.
- *Remedy*: Follow the [installation](#2-create-pre-build-event) instructions to create the pre-build event.
- Possible cause: The local task was renamed and the PowerShell script cannot find it.
- *Remedy*: Update the PowerShell script's `$ProgramName` parameter (default `"BuildVer"`) to match the task name in the project.

Expand Down

0 comments on commit 9d7c788

Please sign in to comment.