blob: c83861a50acd8ba70b980e6f491e4523bec5b93d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash
# This is required to handle return pNew; bug in sqlite
export CGO_CFLAGS="-g -O2 -Wno-return-local-addr"
# Ensure correct params passed into the script
if [ ! -n "$1" ] || [ $1 == "help" ]
then
echo "You must pass a parameter to this script."
echo "Use of 'test', 'test-all', 'build', 'clean-config', 'dummy-import', 'dummy-datamap-import' and 'debug-datamaps' is currently permitted."
fi
# Here is where we launch all the commands
[[ $1 == "test" ]] && go test -v ./datamaps
[[ $1 == "test-all" ]] && go test -v ./...
[[ $1 == "build" ]] && go build -o build/datamaps ./cmd/datamaps/main.go
[[ $1 == "clean-config" ]] && rm -r ~/.config/datamaps/
[[ $1 == "dummy-import" ]] && go run ./cmd/datamaps/main.go import --returnname "Hunkers" --datamapname "Tonk 1" --xlsxpath datamaps/testdata/
[[ $1 == "dummy-datamap-import" ]] && go run ./cmd/datamaps/main.go datamap --datamapname "Tonk 1" --import datamaps/testdata/datamap_matches_test_template.csv
[[ $1 == "debug-datamaps" ]] && dlv test ./datamaps/ --wd ./datamaps/
|