diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c9b0e37..d45fb22 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -62,6 +62,7 @@ jobs: publish-gh-package: runs-on: ubuntu-latest + needs: publish-to-crates-io permissions: contents: read packages: write diff --git a/CHANGELOG.md b/CHANGELOG.md index 42b94e7..9f052ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/Cargo.lock b/Cargo.lock index 5133547..0f7e596 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2441,7 +2441,7 @@ dependencies = [ [[package]] name = "prql-query" -version = "0.0.11" +version = "0.0.12" dependencies = [ "anyhow", "arrow 23.0.0", diff --git a/Cargo.toml b/Cargo.toml index 3abb2c5..26c70db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/Dockerfile b/Dockerfile index 63738f6..86af94b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,9 @@ 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 \ @@ -16,13 +11,20 @@ RUN apt-get -yq update \ 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"] diff --git a/README.md b/README.md index 7bd832e..ebd0b81 100644 --- a/README.md +++ b/README.md @@ -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)