summaryrefslogtreecommitdiffstats
path: root/development.sh
blob: 945000796ec8ceb55cd80ff4e1e1c7b62d3a4a74 (plain)
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
62
63
64
65
66
#!/bin/bash

# Usage: source ./development.sh and use functions defined here
# https://httpie.org/ is required for API calls

export MAVEN_OPTS="-T1C"

function veshv_full_rebuild() {
  mvn clean install -Panalysis ${MAVEN_OPTS}
}

function veshv_rebuild() {
  mvn clean install ${MAVEN_OPTS}
}

function veshv_build() {
  mvn install ${MAVEN_OPTS}
}

function veshv_fast_build() {
  mvn install -DskipTests ${MAVEN_OPTS}
}

function veshv_docker_start() {
  docker-compose down
  docker-compose rm -f
  docker-compose up
}

function veshv_docker_clean() {
  docker volume prune
}

function veshv_build_and_start() {
  veshv_fast_build && veshv_docker_start
}

function veshv_fresh_restart() {
  docker-compose down
  docker-compose rm -f
  veshv_docker_clean
  veshv_fast_build && docker-compose up
}

function veshv_simul_dcaeapp_count() {
  http --json GET http://localhost:8100/messages/count
}

function veshv_simul_dcaeapp_last_key() {
  http --json GET http://localhost:8100/messages/last/key
}

function veshv_simul_dcaeapp_last_value() {
  http --json GET http://localhost:8100/messages/last/value
}

function veshv_simul_client() {
  # feed me with json file using "<"
  http --json POST http://localhost:8000/simulator/sync
}

function veshv_simul_client_async() {
  # feed me with json file using "<"
  http --json POST http://localhost:8000/simulator/async
}