Skip to content

Commit

Permalink
Release!
Browse files Browse the repository at this point in the history
  • Loading branch information
Fell-x27 committed Oct 4, 2024
1 parent be0958f commit cc70a36
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DS_Store
.idea/
/target
/binaries
/distro
*.iml
**/*.rs.bk
Cargo.lock
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pg_cardano"
version = "0.3.0"
version = "1.0.0"
edition = "2021"

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

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

cargo pgrx package --pg-config "$PG_CONFIG" --out-dir "$OUTPUT_DIR" --no-default-features

INSTALL_DIR=$(find "$OUTPUT_DIR" -type d -name "pgrx-install")

if [ -d "$INSTALL_DIR" ]; then
cp "$INSTALL_DIR/lib/postgresql/"* "$BIN_DIR/"
cp "$INSTALL_DIR/share/postgresql/extension/"* "$BIN_DIR/"
echo "Files successfully extracted to $BIN_DIR"
cp "$INSTALL_DIR/lib/postgresql/"* "$DISTR_DIR/"
cp "$INSTALL_DIR/share/postgresql/extension/"* "$DISTR_DIR/"
echo "Files successfully extracted to $DISTR_DIR"
else
echo "pgrx-install directory not found in $OUTPUT_DIR for $PG_VERSION"
fi
Expand All @@ -61,6 +61,6 @@ for PG_VERSION in "${!PG_CONFIGS[@]}"; do

done

cp "$DIR/install.sh" "$DIR/../binaries/"
cp "$DIR/uninstall.sh" "$DIR/../binaries/"
cp "$DIR/install.sh" "$DIR/../distro/"
cp "$DIR/uninstall.sh" "$DIR/../distro/"
echo "Packaging completed."
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ fi
TARGET_DIR="./pg$PG_VERSION"

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

if [ ! -d "$TARGET_DIR" ]; then
echo -e "${BOLD}${RED}Error: Directory with binaries for PostgreSQL $PG_VERSION not found.${RESET}"
echo -e "${BOLD}${RED}Error: Directory with pre-built extension for PostgreSQL $PG_VERSION not found.${RESET}"
exit 1
fi

Expand Down

0 comments on commit cc70a36

Please sign in to comment.