Added tag generation to the build script.

This commit is contained in:
RKrom 2014-11-03 15:42:39 +01:00
parent 850c54fdee
commit 8dc774bcd3

View file

@ -207,6 +207,25 @@ Function PackageInstaller {
return
}
# This function tags the current
Function TagCode {
Write-Host "Setting id_rsa with the content from environment rsakey so we can push a tag"
# Write the RSA key contents from the AppVeyor rsakey UI ENV variable to the private key file
$key = $env:rsakey
$fileContent = "-----BEGIN RSA PRIVATE KEY-----" + "`n"
for ($i = 0; $i -lt $key.Length / 64; $i++) {
$min = [math]::min(64, $key.Length - ($i * 64));
$fileContent += $key.substring($i*64, $min) + "`n";
}
$fileContent += "-----END RSA PRIVATE KEY-----" + "`n"
Set-Content c:\users\greenshot\.ssh\id_rsa $fileContent
Write-Host "Tagging repo with $fileversion"
git tag -a $fileversion -m 'Build from AppVeyor'
Write-Host "Pushing tags to remote."
git push --tags
return
}
FillTemplates
echo "Generating MD5"
@ -220,4 +239,7 @@ echo "Generating ZIP"
PackageZip
echo "Generating Portable"
PackagePortable
PackagePortable
echo "Tagging with $fileversion"
TagCode