Release script
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -36,4 +36,5 @@ Desktop.ini
|
|||||||
/Server/Customers.json
|
/Server/Customers.json
|
||||||
/Server/Settings.json
|
/Server/Settings.json
|
||||||
/Server/invoices/
|
/Server/invoices/
|
||||||
/Server/publish/
|
/Server/publish/
|
||||||
|
/Server/release/
|
||||||
13
.idea/easycode.ignore
generated
Normal file
13
.idea/easycode.ignore
generated
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
vendor/
|
||||||
|
cache/
|
||||||
|
.*/
|
||||||
|
*.min.*
|
||||||
|
*.test.*
|
||||||
|
*.spec.*
|
||||||
|
*.bundle.*
|
||||||
|
*.bundle-min.*
|
||||||
|
*.*.js
|
||||||
|
*.*.ts
|
||||||
|
*.log
|
||||||
8
.run/Release - Create and Pack.run.xml
Normal file
8
.run/Release - Create and Pack.run.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Release - Create and Pack" type="PowerShellRunType" factoryName="PowerShell" scriptUrl="C:\Quelltexte\Privat\TinyInvoice\Script\CreateReleaseArchive.ps1" executablePath="$PROJECT_DIR$/../../../Windows/System32/WindowsPowerShell/v1.0/powershell.exe">
|
||||||
|
<envs />
|
||||||
|
<method v="2">
|
||||||
|
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Release" run_configuration_type="DotNetFolderPublish" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
3
DefaultConfig/Programm starten.bat
Normal file
3
DefaultConfig/Programm starten.bat
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
@echo off
|
||||||
|
cd Program
|
||||||
|
start Server.exe
|
||||||
5
DefaultConfig/Programm öffnen.url
Normal file
5
DefaultConfig/Programm öffnen.url
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[{000214A0-0000-0000-C000-000000000046}]
|
||||||
|
Prop3=19,2
|
||||||
|
[InternetShortcut]
|
||||||
|
IDList=
|
||||||
|
URL=http://localhost:5000/
|
||||||
36
Script/CreateReleaseArchive.ps1
Normal file
36
Script/CreateReleaseArchive.ps1
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# Setze das Arbeitsverzeichnis auf den Skript-Ordner
|
||||||
|
Set-Location -Path (Split-Path -Parent $MyInvocation.MyCommand.Definition)
|
||||||
|
|
||||||
|
# Relative Pfade definieren
|
||||||
|
$sourceConfigPath = "..\DefaultConfig"
|
||||||
|
$releasePath = "..\Server\release"
|
||||||
|
$serverExePath = "..\Server\release\Program\Server.exe"
|
||||||
|
|
||||||
|
# Ziel-ZIP-Datei basierend auf der Version der Server.exe
|
||||||
|
if (-Not (Test-Path -Path $serverExePath)) {
|
||||||
|
Write-Error "Die Datei $serverExePath wurde nicht gefunden."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Version der Server.exe auslesen
|
||||||
|
$fileVersionInfo = (Get-Item $serverExePath).VersionInfo
|
||||||
|
$zipFileName = "Release_$($fileVersionInfo.FileVersion).zip"
|
||||||
|
$zipFilePath = Join-Path $releasePath $zipFileName
|
||||||
|
|
||||||
|
# Sicherstellen, dass das Release-Verzeichnis existiert
|
||||||
|
if (-Not (Test-Path -Path $releasePath)) {
|
||||||
|
New-Item -ItemType Directory -Path $releasePath | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Dateien aus DefaultConfig ins Release-Verzeichnis kopieren
|
||||||
|
Copy-Item -Path $sourceConfigPath\* -Destination $releasePath -Recurse -Force
|
||||||
|
|
||||||
|
# Vorhandene ZIP-Datei mit demselben Namen löschen (falls vorhanden)
|
||||||
|
if (Test-Path -Path $zipFilePath) {
|
||||||
|
Remove-Item -Path $zipFilePath -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
# Alle Dateien im Release-Verzeichnis zippen
|
||||||
|
Compress-Archive -Path "$releasePath\*" -DestinationPath $zipFilePath
|
||||||
|
|
||||||
|
Write-Host "ZIP-Archiv wurde erstellt: $zipFilePath"
|
||||||
Reference in New Issue
Block a user