-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.ps1
executable file
·44 lines (34 loc) · 980 Bytes
/
build.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env pwsh
$version = "0.8.4-SNAPSHOT"
function localDockerBuild() {
docker build -t akovari/yona:latest -t akovari/yona:$version -f Dockerfile.local .
}
function dockerPush() {
docker push akovari/yona:latest
docker push akovari/yona:$version
}
function run([string[]]$programArgs) {
./yona $programArgs
}
function mvnFastBuild() {
mvn package -DskipTests -pl '!native' -pl '!component'
}
function mvnPackage {
mvn package -DexcludedGroups=slow
}
function mvnRelease {
mvn release:update-versions -DautoVersionSubmodules=true
}
[string[]]$programArgs = @()
if ($args.Length -gt 1) {
$programArgs = $args[1..($args.Length-1)]
}
switch($args[0]) {
"build-local-docker" { localDockerBuild }
"push-docker" { dockerPush }
"run" { run($programArgs) }
"package" { mvnPackage }
"local-launcher" { mvnFastBuild; run($programArgs) }
"release" { release }
default { Write-Error "unknown option $($args[0])" }
}