mirror of
https://github.com/tj-actions/pg-dump.git
synced 2024-12-20 01:18:49 +00:00
Update entrypoint.sh
This commit is contained in:
parent
2774405629
commit
36c0d6ee6b
1 changed files with 18 additions and 11 deletions
|
@ -55,20 +55,27 @@ if [[ -n "$INPUT_POSTGRESQL_VERSION" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(uname -s)" == "NT"* ]]; then
|
|
||||||
echo "/Program Files/PostgreSQL/15/bin" >> "$GITHUB_PATH"
|
|
||||||
else
|
|
||||||
echo "/usr/lib/postgresql/15/bin" >> "$GITHUB_PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Installed postgresql"
|
echo "Installed postgresql"
|
||||||
|
|
||||||
|
echo "Running pg_dump..."
|
||||||
|
|
||||||
|
# Verify installation by running pg_dump directly
|
||||||
|
if [[ "$(uname -s)" == "NT"* ]]; then
|
||||||
|
"/Program Files/PostgreSQL/15/bin/pg_dump" --version
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
"/Program Files/PostgreSQL/15/bin/pg_dump" $INPUT_OPTIONS -d "$INPUT_DATABASE_URL" > "$INPUT_PATH"
|
||||||
|
else
|
||||||
|
"/usr/lib/postgresql/15/bin/pg_dump" --version
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
"/usr/lib/postgresql/15/bin/pg_dump" $INPUT_OPTIONS -d "$INPUT_DATABASE_URL" > "$INPUT_PATH"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Running pg_dump..."
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
pg_dump $INPUT_OPTIONS -d "$INPUT_DATABASE_URL" > "$INPUT_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running pg_dump..."
|
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
pg_dump $INPUT_OPTIONS -d "$INPUT_DATABASE_URL" > "$INPUT_PATH"
|
|
||||||
|
|
||||||
echo "Complete"
|
echo "Complete"
|
||||||
|
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
Loading…
Add table
Reference in a new issue