mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 05:53:27 -07:00
To make it easier to work with Greenshot directly after checkout, I removed the AssemblyInfo.cs.template files in favor of modifying the AssemblyInfo.cs directly from our build script.
This commit is contained in:
parent
db8b2cb2c5
commit
1f2534865b
19 changed files with 728 additions and 758 deletions
25
build.ps1
25
build.ps1
|
@ -122,6 +122,29 @@ Function ReleaseNotes {
|
|||
return $releaseNotes
|
||||
}
|
||||
|
||||
# Set the assembly versions
|
||||
Function ReplaceAssemblyVersion {
|
||||
echo "Setting the assembly verions to the Git version $readableversion`n`n"
|
||||
Get-ChildItem . -recurse AssemblyInfo.cs |
|
||||
foreach {
|
||||
$content = Get-Content $_.FullName
|
||||
$newcontent = @()
|
||||
foreach ($line in $content) {
|
||||
# Special case, if we find "@RELEASENOTES@" we replace that line with the release notes
|
||||
if ($line -match "\[assembly: AssemblyInformationalVersion.*") {
|
||||
# skip, it will be added automatically
|
||||
} elseif ($line -match "\[assembly: AssemblyVersion.*") {
|
||||
$newcontent += "[assembly: AssemblyVersion(""$version"")]"
|
||||
$newcontent += "[assembly: AssemblyInformationalVersion(""$detailversion"")]"
|
||||
} else {
|
||||
$newcontent += $line
|
||||
}
|
||||
}
|
||||
# Write the new information back the file
|
||||
$newcontent | Set-Content $_.FullName -encoding UTF8
|
||||
}
|
||||
}
|
||||
|
||||
# Fill the templates
|
||||
Function FillTemplates {
|
||||
echo "Filling templates for Git version $readableversion`n`n"
|
||||
|
@ -303,6 +326,8 @@ Function PackageInstaller {
|
|||
return
|
||||
}
|
||||
|
||||
ReplaceAssemblyVersion
|
||||
|
||||
FillTemplates
|
||||
|
||||
$continue = Read-Host "`n`nPreperations are ready.`nIf you are generating a release you can now change the readme.txt to your desire and use 'y' afterwards to continue building.`nContinue with the build? (y/n)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue