diff --git a/Directory.Build.targets b/Directory.Build.targets index 84e9141..22ef682 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,14 +1,19 @@ + - <_BuildTimestamp>$([System.DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss")) + <_BuildTimestamp Condition="'$(BuildTimestamp)' != ''">$(BuildTimestamp) + <_BuildTimestamp Condition="'$(BuildTimestamp)' == ''">$([System.DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss")) <_BuildTimestampFile>$(IntermediateOutputPath)BuildTimestamp.g.cs + WriteOnlyWhenDifferent="true" /> diff --git a/deploy/publish.py b/deploy/publish.py index 647b42c..944b8ba 100644 --- a/deploy/publish.py +++ b/deploy/publish.py @@ -30,6 +30,7 @@ import subprocess import sys import tempfile import urllib.request +from datetime import datetime from pathlib import Path REPO = Path(__file__).resolve().parent.parent @@ -63,10 +64,15 @@ def publish(rid: str, out_dir: Path) -> None: shutil.rmtree(out_dir) out_dir.mkdir(parents=True) + # Eine Zeitmarke fuer beide Publish-Laeufe: Directory.Build.targets stempelt sonst + # jede Uebersetzung mit der aktuellen Uhrzeit, und der zweite Lauf baut Core und + # Licensing mit anderer Marke neu - dieselbe Fassung, aber nicht mehr bytegleich. + stamp = f"-p:BuildTimestamp={datetime.now():%Y-%m-%d %H:%M:%S}" + run([ "dotnet", "publish", str(PROJECT), "-c", "Release", "-r", rid, "--self-contained", "false", - "-o", str(out_dir), "--nologo", "-v", "q", + "-o", str(out_dir), "--nologo", "-v", "q", stamp, ]) # #588: Der Instanzmanager samt Weboberflaeche gehoert ins selbe Paket. Vorher kam @@ -80,7 +86,7 @@ def publish(rid: str, out_dir: Path) -> None: run([ "dotnet", "publish", str(MANAGER_PROJECT), "-c", "Release", "-r", rid, "--self-contained", "false", - "-o", str(manager_dir), "--nologo", "-v", "q", + "-o", str(manager_dir), "--nologo", "-v", "q", stamp, ]) merge_manager(manager_dir, out_dir)