Skip to content

Commit

Permalink
Homebrew formula release (#183)
Browse files Browse the repository at this point in the history
* Ability to specify pg_config from env variables

* Add homebrew release action

* Update README
  • Loading branch information
var77 authored Sep 28, 2023
1 parent e87563a commit 5d9ffe0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Create source code archive with submodules
if: ${{ github.event_name == 'workflow_dispatch' && inputs.create_release }}
run: |
find ./ -name '.git*' -exec rm -rv {} \; || true
find ./ -name '.git*' -exec rm -r {} \; || true
tar -czf /tmp/lantern-v${{ steps.package.outputs.package_version }}-source.tar.gz .
- uses: geekyeggo/delete-artifact@v2
with:
Expand All @@ -81,9 +81,23 @@ jobs:
id: create_release
if: ${{ github.event_name == 'workflow_dispatch' && inputs.create_release }}
with:
name: LanternDB v${{ steps.package.outputs.package_version }}
name: Lantern v${{ steps.package.outputs.package_version }}
tag_name: v${{ steps.package.outputs.package_version }}
files: |
${{ steps.package.outputs.package_path }}
/tmp/lantern-v${{ steps.package.outputs.package_version }}-source.tar.gz
generate_release_notes: true
- name: Homebrew release
uses: var77/bump-homebrew-formula-action@main
if: ${{ github.event_name == 'workflow_dispatch' && inputs.create_release }}
with:
formula-name: lantern
formula-path: Formula/lantern.rb
tag-name: v${{ steps.package.outputs.package_version }}
download-url: https://github.com/lanterndata/lantern/releases/download/v${{ steps.package.outputs.package_version }}/lantern-v${{ steps.package.outputs.package_version }}-source.tar.gz
homebrew-tap: lanterndata/homebrew-lantern
commit-message: |
{{formulaName}} {{version}}
base-branch: main
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_COMMITTER_TOKEN }}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ cd build
cmake ..
make install
```

To install Lantern using `homebrew`:
```
brew tap lanterndata/lantern
brew install lantern && lantern_install
```

You can also install Lantern on top of PostgreSQL from our [precompiled binaries](https://github.com/lanterndata/lantern/releases) via a single `make install`.

Alternatively, you can use Lantern in one click using [Replit](https://replit.com/@lanterndata/lantern-playground#.replit).
Expand Down
14 changes: 9 additions & 5 deletions cmake/FindPostgreSQL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@
# Define additional search paths for root directories.
set(PostgreSQL_ROOT_DIRECTORIES ENV PGROOT ENV PGPATH ${PostgreSQL_ROOT})

find_program(
PG_CONFIG pg_config
PATHS ${PostgreSQL_ROOT_DIRECTORIES}
PATH_SUFFIXES bin)
if (DEFINED ENV{PG_CONFIG})
set(PG_CONFIG "$ENV{PG_CONFIG}")
else()
find_program(
PG_CONFIG pg_config
PATHS ${PostgreSQL_ROOT_DIRECTORIES}
PATH_SUFFIXES bin)
endif()

if(NOT PG_CONFIG)
message(FATAL_ERROR "Could not find pg_config")
Expand Down Expand Up @@ -156,4 +160,4 @@ if(PostgreSQL_FOUND)
message(
STATUS "PostgreSQL shared linker options: ${PostgreSQL_SHARED_LINK_OPTIONS}"
)
endif()
endif()

0 comments on commit 5d9ffe0

Please sign in to comment.