diff --git a/flow b/flow index 2da5c11..af9b8cc 100755 --- a/flow +++ b/flow @@ -3,34 +3,15 @@ # Flows source "flows/base" source "flows/release" +source "flows/rust" # Vars -# pg_config is tricky as it's not always just a command but needs PATH setup -# We check for it specifically in the prepare function. DEPENDENCIES=(cargo git icu4c pkg-config) CARGO_DEPENDENCIES=(cargo-pgrx) GITEA_ORGANIZATION="cellular" GITEA_REPOSITORY="jspg" PACKAGE_NAME="jspg" -cargo-prepare() { - echo -e "${BLUE}Checking Cargo dependencies...${RESET}" - for DEP in "${CARGO_DEPENDENCIES[@]}"; do \ - if ! command -v "${DEP}" &> /dev/null; then \ - echo -e "${YELLOW}Attempting to install ${DEP} via cargo...${RESET}"; \ - if cargo install "${DEP}"; then - echo -e "โœ… ${GREEN}${DEP}: installed via cargo${RESET}"; \ - else - echo -e "โŒ ${RED}${DEP}: failed to install via cargo${RESET}"; \ - exit 1; \ - fi - else \ - echo -e "โœ… ${GREEN}${DEP}: installed${RESET}"; \ - fi \ - done - echo -e "${GREEN}All Cargo dependencies met.${RESET}" -} - postgres-prepare() { echo -e "${BLUE}Checking PostgreSQL dependencies...${RESET}" if ! command -v pg_config &> /dev/null; then @@ -42,8 +23,6 @@ postgres-prepare() { echo -e "${GREEN}PostgreSQL dependencies met.${RESET}" } -# Build function (used by release flow) -# Creates release artifacts in ./package/ build() { local version version=$(get-version) @@ -81,19 +60,16 @@ build() { echo -e "โœจ ${GREEN}Build v$version complete. Artifacts ready in ./$PACKAGE_DIRECTORY/${RESET}" } -# Install for development (non-release) install() { echo -e "๐Ÿ”ง ${CYAN}Installing jspg extension (dev build)...${RESET}" cargo pgrx install "$@" # Pass any extra args like --debug } -# Run tests test() { echo -e "๐Ÿงช ${CYAN}Running jspg tests...${RESET}" cargo pgrx test "$@" # Pass any extra args } -# Clean build artifacts clean() { echo -e "๐Ÿงน ${CYAN}Cleaning build artifacts...${RESET}" cargo pgrx clean @@ -109,7 +85,6 @@ usage() { echo -e " release Perform a full release (increments patch, builds, tags, pushes, packages)." } -# --- Command Dispatcher --- case "$1" in prepare) base prepare; cargo-prepare; postgres-prepare;; install) install "${@:2}";; diff --git a/flows b/flows index 8431378..24fc253 160000 --- a/flows +++ b/flows @@ -1 +1 @@ -Subproject commit 84313780802fb5f99517a619a871a28daa8cb1c2 +Subproject commit 24fc2538d4fcd7634fb9f041829a637f1a18ebe5