Skip to content

Commit

Permalink
Release bundle structure changed;
Browse files Browse the repository at this point in the history
  • Loading branch information
Fell-x27 committed Oct 5, 2024
1 parent 2adaf4b commit 971dfe6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.DS_Store
.idea/
/target
/distro
/releases
/pg_cardano
*.iml
**/*.rs.bk
Cargo.lock


6 changes: 3 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ for PG_VERSION in "${!PG_CONFIGS[@]}"; do
echo "Packaging for $PG_VERSION using $PG_CONFIG..."

OUTPUT_DIR="$DIR/../target/release/pg_cardano-${PG_VERSION}"
DISTR_DIR="$DIR/../distro/$PG_VERSION"
DISTR_DIR="$DIR/../pg_cardano/bin/$PG_VERSION"
mkdir -p "$DISTR_DIR"

cargo pgrx package --pg-config "$PG_CONFIG" --out-dir "$OUTPUT_DIR" --no-default-features
Expand All @@ -61,6 +61,6 @@ for PG_VERSION in "${!PG_CONFIGS[@]}"; do

done

cp "$DIR/install.sh" "$DIR/../distro/"
cp "$DIR/uninstall.sh" "$DIR/../distro/"
cp "$DIR/install.sh" "$DIR/../pg_cardano/"
cp "$DIR/uninstall.sh" "$DIR/../pg_cardano/"
echo "Packaging completed."
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ if [ -z "$PG_VERSION" ] || [ -z "$SHAREDIR" ] || [ -z "$PKGLIBDIR" ]; then
exit 1
fi

TARGET_DIR="./pg$PG_VERSION"
TARGET_DIR="./bin/pg$PG_VERSION"

if [ ! -d "$TARGET_DIR" ]; then
TARGET_DIR="$DIR/../distro/pg$PG_VERSION"
TARGET_DIR="$DIR/../pg_cardano/bin/pg$PG_VERSION"
fi

if [ ! -d "$TARGET_DIR" ]; then
Expand Down
8 changes: 4 additions & 4 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ fi
echo "Package name: $PACKAGE_NAME"
echo "Package version: $PACKAGE_VERSION"

DISTRO_DIR="$DIR/../distro"
DISTRO_DIR="$DIR/../pg_cardano"
if [ ! -d "$DISTRO_DIR" ]; then
echo "Directory distro not found. Running build.sh..."
echo "Directory pg_cardano not found. Running build.sh..."
"$DIR/build.sh"
fi

if [ ! -d "$DISTRO_DIR" ]; then
echo "Error: Directory distro not found after build.sh."
echo "Error: Directory pg_cardano not found after build.sh."
exit 1
fi

ARCHIVE_NAME="${PACKAGE_NAME}_linux_x64_v${PACKAGE_VERSION}.tar.gz"
tar -czf "$DIR/$ARCHIVE_NAME" -C "$DISTRO_DIR" .
tar -czf "$DIR/$ARCHIVE_NAME" -C "$DIR/.." "$(basename "$DISTRO_DIR")"

RELEASES_DIR="$DIR/../releases"
mkdir -p "$RELEASES_DIR"
Expand Down

0 comments on commit 971dfe6

Please sign in to comment.