@@ -22,120 +22,120 @@ jobs:
2222 name: linux-release-candidate
2323 path: linux-release-candidate
2424
25− windows:
26−
27− runs-on: windows-2019
28− strategy:
29− fail-fast: true
30− matrix:
31− versions:
32− - osarch: "windows-x86_64"
33− arch: "x64"
34− choco_opts: ""
35− stack_opts: "-j1"
36− - osarch: "windows-i386"
37− arch: "x86"
38− choco_opts: "--x86 --version 2.1.3.20190715"
39− stack_opts: "-j1 --flag hslua:lua_32bits"
40− # we use stack 2.1.3 because 2.3.1 doesn't support i386
41−
42− steps:
43− - uses: actions/checkout@v1
44− - name: Install stack
45− shell: cmd
46− run: |
47− choco install haskell-stack ${{ matrix.versions.choco_opts }}
48− - name: Install dependencies
49− run: |
50− stack update
51− stack build ${{ matrix.versions.stack_opts }} --dependencies-only pandoc pandoc-citeproc
52− - name: Create windows package
53− shell: cmd
54− run: |
55− for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
56− stack build ${{ matrix.versions.stack_opts }} pandoc pandoc-citeproc
57− for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
58− @set VERSION=%%b
59− goto :next
60− )
61− :next
62− if "%VERSION%" == "" (
63− echo Error: could not determine version number.
64− exit /b 1
65− )
66− echo Detected version %VERSION%
67− @set WINDOWS=%CD%\windows
68− @set RELEASE=%WINDOWS%\pandoc-%VERSION%
69− mkdir %RELEASE%
70− forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%RELEASE%%"
71− stack exec pandoc -- -s --toc MANUAL.txt -o %RELEASE%\MANUAL.html
72− stack exec pandoc -- -s COPYING.md -t rtf -o %RELEASE%\COPYING.rtf
73− copy %RELEASE%\COPYING.rtf %WINDOWS%
74− copy COPYRIGHT %RELEASE%\COPYRIGHT.txt
75− cd windows
76− echo Creating msi...
77− dir
78− @set WIXBIN="c:\Program Files (x86)\WiX Toolset v3.11\bin"
79− @set WORKDIR=%CD%
80− echo Running candle...
81− %WIXBIN%\candle -arch ${{ matrix.versions.arch }} -dVERSION=%VERSION% -dBINPATH=%RELEASE% *.wxs -out wixobj\
82− if %errorlevel% neq 0 exit /b %errorlevel%
83− echo Running light...
84− %WIXBIN%\light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out %WORKDIR%\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi wixobj\*.wixobj
85− 7z a "pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip" pandoc-%VERSION%
86− cd ..
87− mkdir windows-release-candidate
88− copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi windows-release-candidate
89− copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip windows-release-candidate
90− copy windows\Makefile windows-release-candidate
91− - uses: actions/upload-artifact@v2
92− with:
93− name: windows-release-candidate
94− path: windows-release-candidate
95−
96− macos:
97−
98− runs-on: macOS-10.15
99−
100− steps:
101− - uses: actions/checkout@v1
102− - name: Install stack
103− run: |
104− curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
105− tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
106− - name: Install dependencies
107− run: |
108− ./stack update
109− ./stack build --dependencies-only pandoc pandoc-citeproc
110− - name: Create macOS package
111− run: |
112− export VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
113− export BASEDIR=$(pwd)
114− export ARTIFACTS=${BASEDIR}/macos-release-candidate
115− export RESOURCES=${ARTIFACTS}/Resources
116− export ROOT=${ARTIFACTS}/pandoc
117− export DEST=${ROOT}/usr/local
118− export ME=$(whoami)
119− export BASE=pandoc-$VERSION
120− mkdir -p ${ARTIFACTS}
121− mkdir -p ${RESOURCES}
122− mkdir -p ${DEST}/bin
123− mkdir -p ${DEST}/share/man/man1
124− ./stack build pandoc pandoc-citeproc
125− for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${DEST}/bin/; done
126− strip ${DEST}/bin/pandoc
127− strip ${DEST}/bin/pandoc-citeproc
128− cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.1
129− ${DEST}/bin/pandoc-citeproc --man > \
130− $DEST/share/man/man1/pandoc-citeproc.1
131− ${DEST}/bin/pandoc -t html5 -s COPYING.md -Vpagetitle=License \
132− -o ${RESOURCES}/license.html
133− chown -R $ME:staff ${ROOT}
134− sed -e "s/PANDOCVERSION/${VERSION}/" macos/distribution.xml.in > ${ARTIFACTS}/distribution.xml
135− cp macos/Makefile ${ARTIFACTS}/
136− echo ${VERSION} > ${ARTIFACTS}/version.txt
137− - uses: actions/upload-artifact@v2
138− with:
139− name: macos-release-candidate
140− path: macos-release-candidate
141−
25+# windows:
26+#
27+# runs-on: windows-2019
28+# strategy:
29+# fail-fast: true
30+# matrix:
31+# versions:
32+# - osarch: "windows-x86_64"
33+# arch: "x64"
34+# choco_opts: ""
35+# stack_opts: "-j1"
36+# - osarch: "windows-i386"
37+# arch: "x86"
38+# choco_opts: "--x86 --version 2.1.3.20190715"
39+# stack_opts: "-j1 --flag hslua:lua_32bits"
40+# # we use stack 2.1.3 because 2.3.1 doesn't support i386
41+#
42+# steps:
43+# - uses: actions/checkout@v1
44+# - name: Install stack
45+# shell: cmd
46+# run: |
47+# choco install haskell-stack ${{ matrix.versions.choco_opts }}
48+# - name: Install dependencies
49+# run: |
50+# stack update
51+# stack build ${{ matrix.versions.stack_opts }} --dependencies-only pandoc pandoc-citeproc
52+# - name: Create windows package
53+# shell: cmd
54+# run: |
55+# for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
56+# stack build ${{ matrix.versions.stack_opts }} pandoc pandoc-citeproc
57+# for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
58+# @set VERSION=%%b
59+# goto :next
60+# )
61+# :next
62+# if "%VERSION%" == "" (
63+# echo Error: could not determine version number.
64+# exit /b 1
65+# )
66+# echo Detected version %VERSION%
67+# @set WINDOWS=%CD%\windows
68+# @set RELEASE=%WINDOWS%\pandoc-%VERSION%
69+# mkdir %RELEASE%
70+# forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%RELEASE%%"
71+# stack exec pandoc -- -s --toc MANUAL.txt -o %RELEASE%\MANUAL.html
72+# stack exec pandoc -- -s COPYING.md -t rtf -o %RELEASE%\COPYING.rtf
73+# copy %RELEASE%\COPYING.rtf %WINDOWS%
74+# copy COPYRIGHT %RELEASE%\COPYRIGHT.txt
75+# cd windows
76+# echo Creating msi...
77+# dir
78+# @set WIXBIN="c:\Program Files (x86)\WiX Toolset v3.11\bin"
79+# @set WORKDIR=%CD%
80+# echo Running candle...
81+# %WIXBIN%\candle -arch ${{ matrix.versions.arch }} -dVERSION=%VERSION% -dBINPATH=%RELEASE% *.wxs -out wixobj\
82+# if %errorlevel% neq 0 exit /b %errorlevel%
83+# echo Running light...
84+# %WIXBIN%\light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out %WORKDIR%\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi wixobj\*.wixobj
85+# 7z a "pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip" pandoc-%VERSION%
86+# cd ..
87+# mkdir windows-release-candidate
88+# copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi windows-release-candidate
89+# copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip windows-release-candidate
90+# copy windows\Makefile windows-release-candidate
91+# - uses: actions/upload-artifact@v2
92+# with:
93+# name: windows-release-candidate
94+# path: windows-release-candidate
95+#
96+# macos:
97+#
98+# runs-on: macOS-10.15
99+#
100+# steps:
101+# - uses: actions/checkout@v1
102+# - name: Install stack
103+# run: |
104+# curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
105+# tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
106+# - name: Install dependencies
107+# run: |
108+# ./stack update
109+# ./stack build --dependencies-only pandoc pandoc-citeproc
110+# - name: Create macOS package
111+# run: |
112+# export VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
113+# export BASEDIR=$(pwd)
114+# export ARTIFACTS=${BASEDIR}/macos-release-candidate
115+# export RESOURCES=${ARTIFACTS}/Resources
116+# export ROOT=${ARTIFACTS}/pandoc
117+# export DEST=${ROOT}/usr/local
118+# export ME=$(whoami)
119+# export BASE=pandoc-$VERSION
120+# mkdir -p ${ARTIFACTS}
121+# mkdir -p ${RESOURCES}
122+# mkdir -p ${DEST}/bin
123+# mkdir -p ${DEST}/share/man/man1
124+# ./stack build pandoc pandoc-citeproc
125+# for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${DEST}/bin/; done
126+# strip ${DEST}/bin/pandoc
127+# strip ${DEST}/bin/pandoc-citeproc
128+# cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.1
129+# ${DEST}/bin/pandoc-citeproc --man > \
130+# $DEST/share/man/man1/pandoc-citeproc.1
131+# ${DEST}/bin/pandoc -t html5 -s COPYING.md -Vpagetitle=License \
132+# -o ${RESOURCES}/license.html
133+# chown -R $ME:staff ${ROOT}
134+# sed -e "s/PANDOCVERSION/${VERSION}/" macos/distribution.xml.in > ${ARTIFACTS}/distribution.xml
135+# cp macos/Makefile ${ARTIFACTS}/
136+# echo ${VERSION} > ${ARTIFACTS}/version.txt
137+# - uses: actions/upload-artifact@v2
138+# with:
139+# name: macos-release-candidate
140+# path: macos-release-candidate
141+#