-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathjustfile
61 lines (48 loc) · 1.62 KB
/
justfile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
ELECTRON := "electron"
VERSION := "0.2.3.0"
######################################################################
# Development targets
test:
just build
TESTING=1 {{ELECTRON}} app
killall hyper-haskell-server
run:
just build
{{ELECTRON}} app
build:
cabal build all
######################################################################
# Release targets
APP_NAME := "HyperHaskell"
DIR_DARWIN := "build/" + APP_NAME + "-darwin-arm64"
DIR_WIN32 := "build\\" + APP_NAME + "-win32-x64"
# You need to call
#
# npm install --save-dev @electron/packager
# npm install electron --save-dev
#
# before the following recipe has a chance of working
pkg-darwin:
mkdir -p build \
&& npx @electron/packager \
app \
--out=build \
--overwrite \
--platform=darwin \
--arch=arm64 \
--icon=resources/icons/icon.icns \
--extend-info=resources/macOS-Info.plist \
&& rm {{DIR_DARWIN}}/LICENSE \
&& cp resources/LICENSE.electron.txt {{DIR_DARWIN}}/LICENSE.electron.txt \
&& rm {{DIR_DARWIN}}/version
pkg-win32:
cmd /C "(if not exist build md build) && (electron-packager app --out=build\ --overwrite --platform=win32 --icon=resources\icons\icon.ico) && (del $(DIR_WIN32)\LICENSE) && (echo F|xcopy resources\LICENSE.electron.txt $(DIR_WIN32)\LICENSE.electron.txt) && (del $(DIR_WIN32)\version)"
zip-darwin:
cd {{DIR_DARWIN}} && zip -r ../HyperHaskell-v{{VERSION}}-darwin-x64.zip *
zip-win32:
cmd /C "(cd {{DIR_WIN32}} && (7z a -tzip ..\HyperHaskell-v{{VERSION}}-win32-x64.zip .\)"
hackage:
cabal sdist \
&& cabal upload haskell/hyper \
&& cabal upload haskell/hyper-extra \
&& cabal upload haskell/hyper-haskell-server