-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_release.ps1
29 lines (24 loc) · 1.02 KB
/
build_release.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# clear build directories
Remove-Item -LiteralPath "dist" -Force -Recurse
Remove-Item -LiteralPath "build" -Force -Recurse
# build all subprojects
cmd.exe /c "build_cli.bat"
cmd.exe /c "build_gui.bat"
cmd.exe /c "build_editor.bat"
# create directories for each project
mkdir dist\moodle2pdf_cli
mkdir dist\moodle2pdf_gui\translate\
mkdir dist\moodleeditor\translate\
# put config file and executable into directory
copy config.toml dist\moodle2pdf_cli
copy config.toml dist\moodle2pdf_gui
copy config.toml dist\moodleeditor
copy translate\*.qm dist\moodle2pdf_gui\translate\
copy translate\*.qm dist\moodleeditor\translate\
move dist\moodle2pdf_cli.exe dist\moodle2pdf_cli
move dist\moodle2pdf_gui.exe dist\moodle2pdf_gui
move dist\moodleeditor.exe dist\moodleeditor
# zip each directory
Compress-Archive -Path dist\moodle2pdf_cli -DestinationPath dist\moodle2pdf_cli.zip
Compress-Archive -Path dist\moodle2pdf_gui -DestinationPath dist\moodle2pdf_gui.zip
Compress-Archive -Path dist\moodleeditor -DestinationPath dist\moodleeditor.zip