1
1
@ echo off
2
2
cd %~dp0
3
-
3
+ SET ROOT = %~dp0
4
+ set DRIVE = %~dd0
5
+ set WINGET_SRC = %ROOT% ..\winget-pkgs
4
6
for /f " usebackq" %%i in (`xsl -e -s src\Version\version.xsl src\Version\version.props`) do (
5
7
set VERSION = %%i
6
8
)
7
9
8
10
set WINGET = 1
9
- set APPX_DROPS = D:\XmlNotepadReleases
10
- if not exist %APPX_DROPS% mkdir %APPX_DROPS%
11
11
12
12
echo ### Publishing version %VERSION% ...
13
13
where sed > nul 2 >& 1
@@ -36,20 +36,18 @@ if exist publish\XmlNotepadSetup.zip del publish\XmlNotepadSetup.zip
36
36
pwsh -command " Compress-Archive -Path src\XmlNotepadSetup\bin\Release\* -DestinationPath publish\XmlNotepadSetup.zip"
37
37
38
38
if not EXIST src\XmlNotepadPackage\AppPackages\%VERSION% \XmlNotepadPackage_%VERSION% _Test\XmlNotepadPackage_%VERSION% _AnyCPU.msixbundle goto :noappx
39
- xcopy /y /s src\XmlNotepadPackage\AppPackages\%VERSION% \ %APPX_DROPS% \%VERSION% \
40
- if ERRORLEVEL 1 goto :eof
41
- copy /y src\XmlNotepadPackage\AppPackages\%VERSION% \index.html %APPX_DROPS%
42
- if ERRORLEVEL 1 goto :eof
43
39
44
40
echo Uploading ClickOnce installer to XmlNotepad
45
41
AzurePublishClickOnce %~dp0 publish downloads/XmlNotepad " %LOVETTSOFTWARE_STORAGE_CONNECTION_STRING% "
46
42
if ERRORLEVEL 1 goto :eof
47
43
48
44
if " %WINGET% " == " 0" goto :eof
49
45
46
+ if not exist %WINGET_SRC% goto :nowinget
47
+
50
48
:winget
51
49
echo Syncing winget master branch
52
- pushd d:\git\lovettchris\winget-pkgs \manifests\m\Microsoft\XMLNotepad
50
+ pushd %WINGET_SRC% \manifests\m\Microsoft\XMLNotepad
53
51
git checkout master
54
52
git pull
55
53
git fetch upstream master
@@ -58,10 +56,10 @@ git push
58
56
popd
59
57
60
58
echo Preparing winget package
61
- set TARGET = d:\git\lovettchris\winget-pkgs \manifests\m\Microsoft\XMLNotepad\%VERSION% \
59
+ set TARGET = %WINGET_SRC% \manifests\m\Microsoft\XMLNotepad\%VERSION% \
62
60
if not exist %TARGET% mkdir %TARGET%
63
61
copy /y tools\Microsoft.XMLNotepad*.yaml %TARGET%
64
- wingetcreate update Microsoft.XMLNotepad --version %VERSION% -o d:\git\lovettchris\winget-pkgs -u https://github.com/microsoft/XmlNotepad/releases/download/%VERSION% /XmlNotepadPackage_%VERSION% _AnyCPU.msixbundle
62
+ wingetcreate update Microsoft.XMLNotepad --version %VERSION% -o %WINGET_SRC% -u https://github.com/microsoft/XmlNotepad/releases/download/%VERSION% /XmlNotepadPackage_%VERSION% _AnyCPU.msixbundle
65
63
if ERRORLEVEL 1 goto :eof
66
64
67
65
pushd %TARGET%
@@ -103,4 +101,8 @@ exit /b 1
103
101
104
102
:installfailed
105
103
echo winget install failed
106
- exit /b 1
104
+ exit /b 1
105
+
106
+ :nowinget
107
+ echo Please clone
[email protected] :lovettchris/winget-pkgs.git into
%WINGET_SRC%
108
+ ecit /b 1
0 commit comments