0
0
Fork 0
mirror of https://github.com/tj-actions/install-postgresql.git synced 2024-12-20 01:18:18 +00:00

Remove unused code

This commit is contained in:
Tonye Jack 2023-09-12 11:13:30 -06:00
parent 8e47058fa9
commit 98feacd421
3 changed files with 14 additions and 35 deletions

View file

@ -34,24 +34,6 @@ runs:
- run: |
bash $GITHUB_ACTION_PATH/entrypoint.sh
shell: bash
# Skip if cache hit and it's on Windows
if: |
(
runner.os == 'Windows' && steps.cache-postgresql.outputs.cache-hit != 'true'
)
||
(
runner.os != 'Windows'
)
env:
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
INPUT_POSTGRESQL_VERSION: ${{ inputs.postgresql_version }}
- name: Update PATH
run: |
bash $GITHUB_ACTION_PATH/update-path.sh
shell: bash
env:
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611

View file

@ -48,4 +48,18 @@ fi
echo "Installed postgresql"
echo "Updating PATH..."
# Verify installation by running pg_dump directly
if [[ "$(uname -s)" == "NT"* ]] || [[ "$(uname -s)" == "MINGW"* ]] || [[ "$(uname -s)" == *"MSYS"* ]]; then
# shellcheck disable=SC2028
echo "C:\\Program Files\\PostgreSQL\\$INPUT_POSTGRESQL_VERSION\\bin" >> "$GITHUB_PATH"
elif [[ "$(uname -s)" == "Darwin" ]]; then
echo "/usr/local/opt/postgresql@${INPUT_POSTGRESQL_VERSION}/bin" >> "$GITHUB_PATH"
else
echo "/usr/lib/postgresql/$INPUT_POSTGRESQL_VERSION/bin" >> "$GITHUB_PATH"
fi
echo "Complete"
echo "::endgroup::"

View file

@ -1,17 +0,0 @@
echo "::group::set-postgres-path"
echo "Updating PATH..."
# Verify installation by running pg_dump directly
if [[ "$(uname -s)" == "NT"* ]] || [[ "$(uname -s)" == "MINGW"* ]] || [[ "$(uname -s)" == *"MSYS"* ]]; then
# shellcheck disable=SC2028
echo "C:\\Program Files\\PostgreSQL\\$INPUT_POSTGRESQL_VERSION\\bin" >> "$GITHUB_PATH"
elif [[ "$(uname -s)" == "Darwin" ]]; then
echo "/usr/local/opt/postgresql@${INPUT_POSTGRESQL_VERSION}/bin" >> "$GITHUB_PATH"
else
echo "/usr/lib/postgresql/$INPUT_POSTGRESQL_VERSION/bin" >> "$GITHUB_PATH"
fi
echo "Complete"
echo "::endgroup::"