-
Notifications
You must be signed in to change notification settings - Fork 10
/
ake
executable file
·50 lines (42 loc) · 1021 Bytes
/
ake
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
#!/usr/bin/env nu
def main [] {}
# skip models, which is large
def 'main publish' [version: string, packages?: string = 'common,node,browser,react-native'] {
update-version $version
let pkgs = ($packages | split row ',')
for pkg in $pkgs {
publish $pkg $version
}
}
# Run node example
def --wrapped 'main node example' [...args] {
cd packages/node/example
./ake start ...$args
}
# Run browser example
def 'main browser example' [] {
cd packages/browser/example
./ake start
}
# Run ReactNative example
def 'main react-native example' [] {
cd packages/react-native/example
./ake start
}
# Runc cpp example
def 'main cpp example' [path?: string] {
cd packages/react-native/cpp/example
if $path == null {
./ake start
} else {
./ake start $path
}
}
def publish [package: string, version: string] {
cd $'packages/($package)'
update-version $version
./ake publish
}
def update-version [version: string] {
sed -i $'s/"version": ".*"/"version": "($version)"/' package.json
}