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

fix UNKNOWN being shown as git commit hash (fixes #1530) #1533

Merged
merged 3 commits into from
May 20, 2020

Conversation

monacoremo
Copy link
Member

@monacoremo monacoremo commented May 20, 2020

Fix for #1530

This might be a good compromise - it will show the commit hash in the help text if .git is available (e.g. when someone built PostgREST from source), but it will not show UNKNOWN if it's not.

There are some cases where .git simply can't be available (e.g. when cabal or nix build the package from a sdist tarball from Hackage), so this would give us the best of both worlds I think.

Example when built with nix:

Usage: postgrest FILENAME
  PostgREST 7.0.1 / create a REST API to an existing Postgres database

Example when built with stack:

Usage: postgrest FILENAME
  PostgREST 7.0.1 (69516b9) / create a REST API to an existing Postgres database

@steve-chavez
Copy link
Member

That's a clean solution.

I think it should be included as a fix on the CHANGELOG since it clears up the pgrst help text.

monacoremo and others added 2 commits May 20, 2020 19:42
Co-authored-by: Steve Chavez <stevechavezast@gmail.com>
@monacoremo
Copy link
Member Author

@steve-chavez good idea, I added an entry to the changelog!

@steve-chavez steve-chavez merged commit e6874c8 into PostgREST:master May 20, 2020
@steve-chavez steve-chavez mentioned this pull request Nov 9, 2020
monacoremo added a commit to monacoremo/postgrest that referenced this pull request Jul 17, 2021
@monacoremo monacoremo deleted the monacoremo-gitrev branch July 27, 2021 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants