Skip to content

Commit 1d88325

Browse files
committed
update scripts
1 parent a27af2c commit 1d88325

File tree

11 files changed

+11
-47
lines changed

11 files changed

+11
-47
lines changed

change_column_type_landing_and_recover_quarantine_data/scripts/append_fixtures.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#!/usr/bin/env bash
33
set -e
44

5-
VERSION=$1
6-
75
directory="datasources/fixtures"
86
extensions=("csv" "ndjson")
97

@@ -16,7 +14,7 @@ for extension in "${extensions[@]}"; do
1614
file_name=$(basename "$file_path")
1715
file_name_without_extension="${file_name%.*}"
1816

19-
command="tb --semver $VERSION datasource append $file_name_without_extension datasources/fixtures/$file_name"
17+
command="tb datasource append $file_name_without_extension datasources/fixtures/$file_name"
2018
echo $command
2119
$command
2220
done

change_column_type_landing_and_recover_quarantine_data/scripts/exec_test.sh

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
set -e
44

55
export TB_VERSION_WARNING=0
6-
export VERSION=$1
76

87
run_test() {
98
t=$1
109
echo "** Running $t **"
11-
# Check if VERSION is provided
12-
if [[ -n $VERSION ]]; then
13-
sed -i "s/tb/tb --semver $VERSION/" $t
14-
fi
1510
echo "** $(cat $t)"
1611
tmpfile=$(mktemp)
1712
if bash $t $2 >$tmpfile; then
@@ -36,7 +31,7 @@ run_test() {
3631
export -f run_test
3732

3833
fail=0
39-
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} $VERSION || fail=1
34+
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} || fail=1
4035

4136
if [ $fail == 1 ]; then
4237
exit -1;

change_copy_pipe_time_granularity/scripts/append_fixtures.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#!/usr/bin/env bash
33
set -euxo pipefail
44

5-
VERSION=$1
6-
75
directory="datasources/fixtures"
86
extensions=("csv" "ndjson")
97

@@ -16,7 +14,7 @@ for extension in "${extensions[@]}"; do
1614
file_name=$(basename "$file_path")
1715
file_name_without_extension="${file_name%.*}"
1816

19-
command="tb --semver $VERSION datasource append $file_name_without_extension datasources/fixtures/$file_name"
17+
command="tb datasource append $file_name_without_extension datasources/fixtures/$file_name"
2018
echo $command
2119
$command
2220
done

change_copy_pipe_time_granularity/scripts/exec_test.sh

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
set -euxo pipefail
44

55
export TB_VERSION_WARNING=0
6-
export VERSION=$1
76

87
run_test() {
98
t=$1
109
echo "** Running $t **"
11-
# Check if VERSION is provided
12-
if [[ -n $VERSION ]]; then
13-
sed -i "s/tb/tb --semver $VERSION/" $t
14-
fi
1510
echo "** $(cat $t)"
1611
tmpfile=$(mktemp)
1712
if bash $t $2 >$tmpfile; then
@@ -36,7 +31,7 @@ run_test() {
3631
export -f run_test
3732

3833
fail=0
39-
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} $VERSION || fail=1
34+
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} || fail=1
4035

4136
if [ $fail == 1 ]; then
4237
exit -1;

change_sorting_key_landing_data_source/scripts/append_fixtures.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env bash
22

3-
VERSION=$1
4-
53
directory="datasources/fixtures"
64
extensions=("csv" "ndjson")
75

@@ -14,7 +12,7 @@ for extension in "${extensions[@]}"; do
1412
file_name=$(basename "$file_path")
1513
file_name_without_extension="${file_name%.*}"
1614

17-
command="tb --semver $VERSION datasource append $file_name_without_extension datasources/fixtures/$file_name"
15+
command="tb datasource append $file_name_without_extension datasources/fixtures/$file_name"
1816
echo $command
1917
$command
2018
done

change_sorting_key_landing_data_source/scripts/exec_test.sh

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
set -euxo pipefail
33

44
export TB_VERSION_WARNING=0
5-
export VERSION=$1
65

76
run_test() {
87
t=$1
98
echo "** Running $t **"
10-
# Check if VERSION is provided
11-
if [[ -n $VERSION ]]; then
12-
sed -i "s/tb/tb --semver $VERSION/" $t
13-
fi
149
echo "** $(cat $t)"
1510
tmpfile=$(mktemp)
1611
retries=0
@@ -55,7 +50,7 @@ run_test() {
5550
export -f run_test
5651

5752
fail=0
58-
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} $VERSION || fail=1
53+
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} || fail=1
5954

6055
if [ $fail == 1 ]; then
6156
exit -1;

create_a_materialized_view_batch_ingest/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Remember that in this example we are not ingesting data constanly to `analytics_
8888
- At deployment time
8989

9090
```sh
91-
tb --semver $VERSION pipe populate events_per_location_mat --node count_events_per_location
91+
tb pipe populate events_per_location_mat --node count_events_per_location
9292
```
9393

9494
For more complex use cases —i.e. having realtime ingest— check other entries of the [use-case-examples repo](https://github.com/tinybirdco/use-case-examples).
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
set -e
33

4-
tb --semver $VERSION pipe populate events_per_location_mat --node count_events_per_location --wait
4+
tb pipe populate events_per_location_mat --node count_events_per_location --wait

create_a_materialized_view_batch_ingest/scripts/exec_test.sh

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
#!/usr/bin/env bash
22

33
export TB_VERSION_WARNING=0
4-
export VERSION=$1
54

65
run_test() {
76
t=$1
87
echo "** Running $t **"
9-
# Check if VERSION is provided
10-
if [[ -n $VERSION ]]; then
11-
echo "VERSION found: $VERSION"
12-
sed -i "s/tb/tb --semver $VERSION/" $t
13-
else
14-
echo "VERSION not found"
15-
fi
168
echo "** $(cat $t)"
179
if res=$(bash $t $2 | diff -B ${t}.result -); then
1810
echo 'OK';
@@ -26,7 +18,7 @@ run_test() {
2618
export -f run_test
2719

2820
fail=0
29-
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} $VERSION || fail=1
21+
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} || fail=1
3022

3123
if [ $fail == 1 ]; then
3224
exit -1;

create_pipe_sink/scripts/append_fixtures.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#!/usr/bin/env bash
33
set -euxo pipefail
44

5-
VERSION=$1
6-
75
directory="datasources/fixtures"
86
extensions=("csv" "ndjson")
97

@@ -16,7 +14,7 @@ for extension in "${extensions[@]}"; do
1614
file_name=$(basename "$file_path")
1715
file_name_without_extension="${file_name%.*}"
1816

19-
command="tb --semver $VERSION datasource append $file_name_without_extension datasources/fixtures/$file_name"
17+
command="tb datasource append $file_name_without_extension datasources/fixtures/$file_name"
2018
echo $command
2119
$command
2220
done

create_pipe_sink/scripts/exec_test.sh

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
set -euxo pipefail
44

55
export TB_VERSION_WARNING=0
6-
export VERSION=$1
76

87
run_test() {
98
t=$1
109
echo "** Running $t **"
11-
# Check if VERSION is provided
12-
if [[ -n $VERSION ]]; then
13-
sed -i "s/tb/tb --semver $VERSION/" $t
14-
fi
1510
echo "** $(cat $t)"
1611
tmpfile=$(mktemp)
1712
retries=0
@@ -56,7 +51,7 @@ run_test() {
5651
export -f run_test
5752

5853
fail=0
59-
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} $VERSION || fail=1
54+
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} || fail=1
6055

6156
if [ $fail == 1 ]; then
6257
exit -1;

0 commit comments

Comments
 (0)