Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tools/build flexibility for local builds. #372

Merged
merged 1 commit into from
Apr 15, 2022
Merged

Improve tools/build flexibility for local builds. #372

merged 1 commit into from
Apr 15, 2022

Conversation

epgts
Copy link
Contributor

@epgts epgts commented Mar 16, 2022

  • Add parameters for path to pg_config and server TCP port.
  • Run local sql-doctester, not whatever is installed.

- Add parameters for path to pg_config and server TCP port.
- Run local sql-doctester, not whatever is installed.
Copy link
Contributor Author

@epgts epgts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding explanatory comments in case that helps y'all with the review :)

require_pgversion() {
[ -n "$pgversion" ] || die 'specify one of -pg12 | -pg13 | -pg14'
require_pg_version() {
[ -n "$pg_version" ] || die 'specify one of -pg12 | -pg13 | -pg14'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we have pure renames

echo $1)
pg_config="$HOME/.pgx/$full_version/pgx-install/bin/pg_config"
find_pg_config() {
if [ -z "$pg_config" ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we add a check if pg_config is already specified before looking for it in ~/.pgx (which remains the default and what we use under the github action).

pgport=288$pgversion
pg_version=${arg#-pg}
pg=pg$pg_version
[ -z "$pg_port" ] && pg_port=288$pg_version
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, only use pgx's port numbering scheme if port wasn't already specified.

@epgts
Copy link
Contributor Author

epgts commented Apr 15, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 15, 2022

Build succeeded:

@bors bors bot merged commit ec0c2d8 into main Apr 15, 2022
@bors bors bot deleted the eg/build branch April 15, 2022 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants