2017-08-15 14:38:32 +01:00
|
|
|
@echo off
|
|
|
|
set verbose off
|
|
|
|
set NOW=%TIME% %DATE%
|
|
|
|
echo "Build process started %NOW%"
|
|
|
|
|
|
|
|
echo "Building Ember assets..."
|
|
|
|
cd gui
|
|
|
|
call ember b -o dist-prod/ --environment=production
|
|
|
|
::Call allows the rest of the file to run
|
|
|
|
|
|
|
|
echo "Copying Ember assets..."
|
|
|
|
cd ..
|
2019-01-07 14:43:56 +00:00
|
|
|
|
2017-08-15 14:38:32 +01:00
|
|
|
rd /s /q embed\bindata\public
|
|
|
|
mkdir embed\bindata\public
|
|
|
|
echo "Copying Ember assets folder"
|
2018-05-02 14:52:23 +01:00
|
|
|
robocopy /e /NFL /NDL /NJH gui\dist-prod\assets embed\bindata\public\assets
|
2017-08-15 14:38:32 +01:00
|
|
|
echo "Copying Ember codemirror folder"
|
|
|
|
robocopy /e /NFL /NDL /NJH gui\dist-prod\codemirror embed\bindata\public\codemirror
|
2019-01-15 20:13:45 +00:00
|
|
|
echo "Copying Ember prism folder"
|
|
|
|
robocopy /e /NFL /NDL /NJH gui\dist-prod\prism embed\bindata\public\prism
|
2017-08-15 14:38:32 +01:00
|
|
|
echo "Copying Ember tinymce folder"
|
2018-05-02 14:52:23 +01:00
|
|
|
robocopy /e /NFL /NDL /NJH gui\dist-prod\tinymce embed\bindata\public\tinymce
|
2019-04-19 15:09:12 +01:00
|
|
|
echo "Copying Ember pdfjs folder"
|
|
|
|
robocopy /e /NFL /NDL /NJH gui\dist-prod\pdfjs embed\bindata\public\pdfjs
|
2017-08-15 14:38:32 +01:00
|
|
|
echo "Copying Ember sections folder"
|
|
|
|
robocopy /e /NFL /NDL /NJH gui\dist-prod\sections embed\bindata\public\sections
|
|
|
|
|
|
|
|
copy gui\dist-prod\*.* embed\bindata
|
|
|
|
copy gui\dist-prod\favicon.ico embed\bindata\public
|
|
|
|
copy gui\dist-prod\manifest.json embed\bindata\public
|
|
|
|
|
|
|
|
rd /s /q embed\bindata\mail
|
|
|
|
mkdir embed\bindata\mail
|
|
|
|
copy domain\mail\*.html embed\bindata\mail
|
|
|
|
copy core\database\templates\*.html embed\bindata
|
|
|
|
|
|
|
|
rd /s /q embed\bindata\scripts
|
|
|
|
mkdir embed\bindata\scripts
|
2018-09-14 12:50:30 +01:00
|
|
|
mkdir embed\bindata\scripts\mysql
|
2018-09-26 17:59:56 +01:00
|
|
|
mkdir embed\bindata\scripts\postgresql
|
2019-03-29 16:42:49 +00:00
|
|
|
mkdir embed\bindata\scripts\sqlserver
|
2017-08-15 14:38:32 +01:00
|
|
|
|
|
|
|
echo "Copying database scripts folder"
|
2018-09-14 12:50:30 +01:00
|
|
|
robocopy /e /NFL /NDL /NJH core\database\scripts\mysql embed\bindata\scripts\mysql
|
2018-09-26 17:59:56 +01:00
|
|
|
robocopy /e /NFL /NDL /NJH core\database\scripts\postgresql embed\bindata\scripts\postgresql
|
2019-03-29 16:42:49 +00:00
|
|
|
robocopy /e /NFL /NDL /NJH core\database\scripts\sqlserver embed\bindata\scripts\sqlserver
|
2017-08-15 14:38:32 +01:00
|
|
|
|
|
|
|
echo "Generating in-memory static assets..."
|
|
|
|
go get -u github.com/jteeuwen/go-bindata/...
|
|
|
|
go get -u github.com/elazarl/go-bindata-assetfs/...
|
|
|
|
cd embed
|
2018-05-02 14:52:23 +01:00
|
|
|
go generate
|
2017-08-15 14:38:32 +01:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Compiling Windows"
|
|
|
|
set GOOS=windows
|
2019-04-16 13:10:44 +01:00
|
|
|
go build -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-windows-amd64.exe edition/community.go
|
2017-08-15 14:38:32 +01:00
|
|
|
|
|
|
|
echo "Compiling Linux"
|
|
|
|
set GOOS=linux
|
2019-04-16 13:10:44 +01:00
|
|
|
go build -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-linux-amd64 edition/community.go
|
2017-08-15 14:38:32 +01:00
|
|
|
|
|
|
|
echo "Compiling Darwin"
|
|
|
|
set GOOS=darwin
|
2019-04-16 13:10:44 +01:00
|
|
|
go build -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-darwin-amd64 edition/community.go
|