-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build locally pdp * little fix * pre commit fix * fix PDP_VANILLA var to bool * fix1
- Loading branch information
1 parent
f7a59cf
commit 107f438
Showing
2 changed files
with
39 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,20 +2,28 @@ | |
|
||
set -e | ||
|
||
rm -rf custom | ||
mkdir custom | ||
# Check if PDP_VANILLA is set to true from command line argument | ||
if [ "$PDP_VANILLA" == "true" ]; then | ||
echo "Building for pdp-vanilla environment." | ||
fi | ||
|
||
if [ "$CUSTOM_OPAL" != "" ] | ||
then | ||
echo "Using custom OPAL from $CUSTOM_OPAL" | ||
tar -czf custom/custom_opal.tar.gz -C "$CUSTOM_OPAL" --exclude opal-server --exclude '.*' packages README.md | ||
fi; | ||
# Check if permit-opa directory already exists | ||
if [ ! -d "../permit-opa" ]; then | ||
# Clone the permit-opa repository into the parent directory if it doesn't exist | ||
git clone [email protected]:permitio/permit-opa.git ../permit-opa | ||
else | ||
echo "permit-opa directory already exists. Skipping clone operation." | ||
fi | ||
|
||
if [ "$CUSTOM_OPA" != "" ] | ||
then | ||
echo "Using custom OPA from $CUSTOM_OPA" | ||
# Conditionally execute the custom OPA tarball creation section based on the value of PDP_VANILLA | ||
if [ "$PDP_VANILLA" != "true" ]; then | ||
# Custom OPA tarball creation section | ||
rm -rf custom | ||
mkdir custom | ||
build_root="$PWD" | ||
cd "$CUSTOM_OPA" | ||
cd "../permit-opa" | ||
find * -name '*go*' -print0 | xargs -0 tar -czf "$build_root"/custom/custom_opa.tar.gz --exclude '.*' | ||
cd "$build_root" | ||
else | ||
echo "Skipping custom OPA tarball creation for pdp-vanilla environment." | ||
fi |