This repository has been archived by the owner on Apr 2, 2020. It is now read-only.
forked from Protobuild/Protobuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version Protobuild at 1.17.400, and update help format (Protobuild#261)
- Loading branch information
Showing
60 changed files
with
1,094 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<xsl:if test="$root/Input/Generation/ProjectName = 'Protobuild.Internal'"> | ||
<Target Name="GenerateProtobuildVersion" BeforeTargets="BeforeBuild"> | ||
<Exec> | ||
<xsl:attribute name="WorkingDirectory"> | ||
<xsl:value-of select="$root/Input/Generation/RootPath" /> | ||
<xsl:value-of select="$project/@Path" /> | ||
</xsl:attribute> | ||
<xsl:attribute name="Command"> | ||
<xsl:if test="$root/Input/Generation/HostPlatform = 'Linux'"> | ||
<xsl:text>bash ../Build/GenerateVersion.sh</xsl:text> | ||
</xsl:if> | ||
<xsl:if test="$root/Input/Generation/HostPlatform = 'MacOS'"> | ||
<xsl:text>bash ../Build/GenerateVersion.sh</xsl:text> | ||
</xsl:if> | ||
<xsl:if test="$root/Input/Generation/HostPlatform = 'Windows'"> | ||
<xsl:text>powershell -ExecutionPolicy Bypass ..\Build\GenerateVersion.ps1</xsl:text> | ||
</xsl:if> | ||
</xsl:attribute> | ||
</Exec> | ||
</Target> | ||
</xsl:if> |
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,32 @@ | ||
param() | ||
|
||
[xml]$ModuleDocument = Get-Content -Path $PSScriptRoot\Module.xml | ||
|
||
$SemanticVersion = $ModuleDocument.Module.SemanticVersion | ||
$BuildDate = Get-Date -Date ((Get-Date).ToUniversalTime()) -UFormat "+%Y-%m-%d %H:%M:%S" | ||
$BuildDate = "$BuildDate UTC" | ||
$BuildCommit = $(git rev-parse HEAD) | ||
$JenkinsGitBranch = $env:GIT_BRANCH | ||
if ($JenkinsGitBranch -ne "" -and $JenkinsGitBranch -ne $null) { | ||
$BuildCommit = "$BuildCommit; $JenkinsGitBranch" | ||
} | ||
$BuildIsDirty = "false" | ||
if ( ((git status --porcelain) | Out-String) -ne "" ) { | ||
$BuildIsDirty = "true" | ||
} | ||
|
||
Write-Output @" | ||
namespace Protobuild | ||
{ | ||
public static class ProtobuildVersion | ||
{ | ||
public const string SemanticVersion = "$SemanticVersion"; | ||
public const string BuildDate = "$BuildDate"; | ||
public const string BuildCommit = "$BuildCommit"; | ||
public const bool BuiltWithPendingChanges = $BuildIsDirty; | ||
} | ||
} | ||
"@.Trim() | Out-File -Encoding ASCII ProtobuildVersion.cs |
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,43 @@ | ||
#!/bin/bash | ||
|
||
# Read the semantic version out of ModuleInfo.xml .... :O | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
rdom () { local IFS=\> ; read -d \< E C ;} | ||
SEMANTIC_VERSION=$(while rdom; do | ||
if [[ $E = "SemanticVersion" ]]; then | ||
echo $C | ||
exit | ||
fi | ||
done < $SCRIPT_DIR/Module.xml) | ||
|
||
# Get build date | ||
BUILD_DATE=`date -u '+%Y-%m-%d %H:%M:%S'` | ||
BUILD_DATE="$BUILD_DATE UTC" | ||
|
||
# Get current commit | ||
BUILD_COMMIT=`git rev-parse HEAD` | ||
if [ "$GIT_BRANCH" != "" ]; then | ||
BUILD_COMMIT="$BUILD_COMMIT; $GIT_BRANCH" | ||
fi | ||
|
||
# Determine if there are pending changes (dirty working directory) | ||
BUILD_IS_DIRTY="false" | ||
if [ "$(git status --porcelain)" != "" ]; then | ||
BUILD_IS_DIRTY="true" | ||
fi | ||
|
||
cat >ProtobuildVersion.cs <<EOF | ||
namespace Protobuild | ||
{ | ||
public static class ProtobuildVersion | ||
{ | ||
public const string SemanticVersion = "$SEMANTIC_VERSION"; | ||
public const string BuildDate = "$BUILD_DATE"; | ||
public const string BuildCommit = "$BUILD_COMMIT"; | ||
public const bool BuiltWithPendingChanges = $BUILD_IS_DIRTY; | ||
} | ||
} | ||
EOF |
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
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
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
Oops, something went wrong.