Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #8 from prql/v0.0.12
Browse files Browse the repository at this point in the history
Minor release to fix some Docker details and test the homebrew publish workflow.
  • Loading branch information
Tobias Brandt committed Oct 24, 2022
2 parents 3d4c624 + 4eda4bd commit f06d116
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:

publish-gh-package:
runs-on: ubuntu-latest
needs: publish-to-crates-io
permissions:
contents: read
packages: write
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# pq Changelog

## 0.0.12 - 2022-10-24

* Fixed Docker alias command.
* Fixed spaces in table aliases issue.

## 0.0.11 - 2022-10-18

* Fixed metadata step in Github action.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository = "https://github.com/prql/prql-query"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.64.0"
version = "0.0.11"
version = "0.0.12"

[[bin]]
name = "pq"
Expand Down
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
ARG RUST_VERSION=1.64.0-slim-buster
ARG DEBIAN_VERSION=stable-slim

# --- crates_io ---
# Once we have pq published on crates.io we can use this
#FROM rust:$RUST_VERSION AS crates_io
#ARG PQ_VERSION
#RUN cargo install pq --version $PQ_VERSION

# --- build ---
FROM rust:$RUST_VERSION AS build

# --- build-requirements ---
RUN apt-get -yq update \
&& apt install -y \
build-essential \
clang \
libclang-dev \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY . .
RUN cargo build --release
# --- build from workdir ---
#WORKDIR /app
#COPY . .
#RUN cargo build --release && \
# mv -v /app/target/release/pq /usr/local/cargo/bin/

# --- build from crates.io ---
#ARG PQ_VERSION
#RUN cargo install prql-query --version $PQ_VERSION
RUN cargo install prql-query

# --- image ---
FROM debian:$DEBIAN_VERSION
WORKDIR /data
COPY --from=build /app/target/release/pq /usr/local/bin/pq
COPY --from=build /usr/local/cargo/bin/pq /usr/local/bin/pq

ENTRYPOINT ["pq"]
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,16 @@ Binaries are built for Windows, macOS and Linux for every release and can be
dowloaded from [Releases](https://github.com/prql/prql-query/releases/)
([latest](https://github.com/prql/prql-query/releases/latest)).

For example on linux you could download and install `pq` with:

VERSION=v0.0.11 wget https://github.com/prql/prql-query/releases/download/$VERSION/pq-x86_64-unknown-linux-gnu.tar.gz && \
tar xvzf pq-x86_64-unknown-linux-gnu.tar.gz --directory ~/.local/bin && \
rm pq-x86_64-unknown-linux-gnu.tar.gz

### Run as a container image (Docker)

docker pull ghcr.io/prql/prql-query:v0.0.11
alias pq="docker run --rm -it -v $(pwd):/data -w /data -u $(id -u):$(id -g) ghcr.io/prql/prql-query:v0.0.11"
docker pull ghcr.io/prql/prql-query
alias pq="docker run --rm -it -v $(pwd):/data -e HOME=/tmp -u $(id -u):$(id -g) ghcr.io/prql/prql-query"
pq --help

### Via Rust toolchain (Cargo)
Expand Down

0 comments on commit f06d116

Please sign in to comment.