Skip to content

Commit

Permalink
fix build.cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
lovettchris committed Sep 19, 2024
1 parent 6ff9c76 commit e6c7bfb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,4 @@ _site/
/src/Application/Samples/rsspretty_output.htm
/publish_appx
/src/Application/Samples/rss.htm
src/XmlNotepadSetup/build.cmd
/src/Model/ApiKey.cs
4 changes: 3 additions & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
nuget restore src\XmlNotepad.sln
if ERRORLEVEL 1 goto :eof

echo namespace XmlNotepad { public partial class AppAnalytics { private const string ApiKey="%XMLNOTEPAD_ANALYTICSKEY%"; } } > src\model\ApiKey.cs

msbuild /target:rebuild src\UpdateVersions\UpdateVersions.csproj /p:Configuration=Release "/p:Platform=AnyCPU"
if ERRORLEVEL 1 goto :eof

%~dp0\src\UpdateVersions\bin\Release\UpdateVersions.exe
if ERRORLEVEL 1 goto :eof

for %%i in (Release, Debug) do (
for %%i in (Release, Debug) do (
msbuild /target:rebuild src\XmlNotepad.sln /p:Configuration=%%i "/p:Platform=Any CPU"
if ERRORLEVEL 1 goto :eof
)
Expand Down
11 changes: 1 addition & 10 deletions publish.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,9 @@ if EXIST "%ROOT%\publish" rd /s /q "%ROOT%\publish"
if EXIST "%PUBLISH%" rd /s /q "%PUBLISH%"

git clean -dfx
nuget restore src\xmlnotepad.sln
if ERRORLEVEL 1 goto :eof

msbuild /target:rebuild src\UpdateVersions\UpdateVersions.csproj /p:Configuration=Release "/p:Platform=AnyCPU"
if ERRORLEVEL 1 goto :eof
call .\build.cmd

src\UpdateVersions\bin\Release\UpdateVersions.exe
if ERRORLEVEL 1 goto :eof

echo namespace XmlNotepad { public partial class AppAnalytics { private const string ApiKey="%XMLNOTEPAD_ANALYTICSKEY%"; } } > src\model\ApiKey.cs
msbuild /target:rebuild src\xmlnotepad.sln /p:Configuration=Release "/p:Platform=Any CPU"
if ERRORLEVEL 1 goto :nobits
msbuild /target:publish src\xmlnotepad.sln /p:Configuration=Release "/p:Platform=Any CPU"
if ERRORLEVEL 1 goto :nobits
if not EXIST %PUBLISH%\XmlNotepad.application goto :nobits
Expand Down

0 comments on commit e6c7bfb

Please sign in to comment.