Skip to content

Commit 6d2562d

Browse files
committed
make build_opal_bundle script copy the new datasync repo for local development
1 parent 68c933c commit 6d2562d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

build_opal_bundle.sh

+15
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ else
1515
echo "permit-opa directory already exists. Skipping clone operation."
1616
fi
1717

18+
# Check if datasync directory already exists
19+
if [ ! -d "../datasync" ]; then
20+
# Clone the permit-opa repository into the parent directory if it doesn't exist
21+
git clone [email protected]:permitio/datasync.git ../datasync
22+
else
23+
echo "datasync directory already exists. Skipping clone operation."
24+
fi
25+
1826
# Conditionally execute the custom OPA tarball creation section based on the value of PDP_VANILLA
1927
if [ "$PDP_VANILLA" != "true" ]; then
2028
# Custom OPA tarball creation section
@@ -24,6 +32,13 @@ if [ "$PDP_VANILLA" != "true" ]; then
2432
cd "../permit-opa"
2533
find * -name '*go*' -print0 | xargs -0 tar -czf "$build_root"/custom/custom_opa.tar.gz --exclude '.*'
2634
cd "$build_root"
35+
# Datasync tarball creation section
36+
rm -rf datasync
37+
mkdir datasync
38+
build_root="$PWD"
39+
cd "../datasync"
40+
find * -name '*go*' -print0 | xargs -0 tar -czf "$build_root"/datasync/datasync.tar.gz --exclude '.*'
41+
cd "$build_root"
2742
else
2843
echo "Skipping custom OPA tarball creation for pdp-vanilla environment."
2944
fi

0 commit comments

Comments
 (0)