2022-12-04 00:39:53 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
t="transform"
|
|
|
|
|
|
|
|
# create tmp directory
|
|
|
|
tmpdir="$(mktemp -d)"
|
|
|
|
trap '{ rm -rf "${tmpdir}"; }' 0 2 3 15
|
|
|
|
|
|
|
|
# assertion
|
|
|
|
cp data/duplicates-transformed.tsv "${tmpdir}/${t}.assert"
|
|
|
|
|
2023-11-16 22:42:20 +01:00
|
|
|
# transform
|
|
|
|
cp data/duplicates-history.json "${tmpdir}/${t}.history"
|
|
|
|
|
2022-12-04 00:39:53 +01:00
|
|
|
# action
|
|
|
|
cd "${tmpdir}" || exit 1
|
2023-12-16 03:35:58 +01:00
|
|
|
orcli import csv "https://git.io/fj5hF" --projectName "${t}"
|
|
|
|
orcli transform "${t}" "${t}.history"
|
|
|
|
orcli export tsv "${t}" --output "${t}.output"
|
2022-12-04 00:39:53 +01:00
|
|
|
|
|
|
|
# test
|
2023-12-16 03:35:58 +01:00
|
|
|
diff -u "${t}.assert" "${t}.output"
|