From 971dfe622bc512ae920b139d6a76da58f4616958 Mon Sep 17 00:00:00 2001 From: Fell-x27 Date: Sun, 6 Oct 2024 01:46:10 +0500 Subject: [PATCH] Release bundle structure changed; --- .gitignore | 3 ++- scripts/build.sh | 6 +++--- scripts/install.sh | 4 ++-- scripts/release.sh | 8 ++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index b27cff3..3750dbb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,10 @@ .DS_Store .idea/ /target -/distro /releases +/pg_cardano *.iml **/*.rs.bk Cargo.lock + diff --git a/scripts/build.sh b/scripts/build.sh index f622e87..1d53409 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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 @@ -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." diff --git a/scripts/install.sh b/scripts/install.sh index 592f2d6..ed553ed 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -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 diff --git a/scripts/release.sh b/scripts/release.sh index 65134c3..672d090 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -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"