diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 338316786..2344d16bf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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: @@ -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 }} diff --git a/README.md b/README.md index e35a0411d..ced0e4087 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/cmake/FindPostgreSQL.cmake b/cmake/FindPostgreSQL.cmake index bfe842788..2e76e0ae3 100644 --- a/cmake/FindPostgreSQL.cmake +++ b/cmake/FindPostgreSQL.cmake @@ -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") @@ -156,4 +160,4 @@ if(PostgreSQL_FOUND) message( STATUS "PostgreSQL shared linker options: ${PostgreSQL_SHARED_LINK_OPTIONS}" ) -endif() \ No newline at end of file +endif()