From 28dcd425ce53f4925d8b2f9342f466338a3a5e01 Mon Sep 17 00:00:00 2001 From: Silen Locatelli <88315530+SilenLoc@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:16:54 +0100 Subject: [PATCH] draft --- .github/workflows/github-release.yml | 35 ++++- .github/workflows/verify.yml | 13 +- Cargo.toml | 1 + README.md | 19 ++- justfile | 7 +- wix/main.wxs | 220 +++++++++++++++++++++++++++ 6 files changed, 279 insertions(+), 16 deletions(-) create mode 100644 wix/main.wxs diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index bccf47c..937e186 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -10,13 +10,45 @@ on: - v[0-9]+.* jobs: - create-release: + verify: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: taiki-e/install-action@v2 with: tool: cargo-hack@0.5,cargo-deny@0.13,just@1,hurl@4,cargo-edit@0.12 + - run: just verify + + create-windows-installer: + needs: verify + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: taiki-e/install-action@v2 + with: + tool: just@1 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '3.1.x' + - name: install wix + run: dotnet tool install --global wix + - run: wix --version + - run: cargo install cargo-wix + - run: cargo wix + - name: Step 3 - Use the Upload Artifact GitHub Action + uses: actions/upload-artifact@v2 + with: + name: assets-for-download + path: downloads + + + create-release-and-docker-images: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: taiki-e/install-action@v2 + with: + tool: just@1 - uses: docker/login-action@v3 with: @@ -24,7 +56,6 @@ jobs: username: ${{ github.actor }} password: ${{ github.token }} - - run: just verify - name: create docker images working-directory: ./distributions run: | diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 903c877..aad260d 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -9,7 +9,7 @@ on: branches: [ main ] jobs: - test-and-create-image: + Verify: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -17,15 +17,4 @@ jobs: with: tool: cargo-hack@0.5,cargo-deny@0.13,just@1,hurl@4,cargo-edit@0.12 - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ github.token }} - - run: just verify - - name: create docker images - working-directory: ./distributions - run: | - just build-docker-image ${{ github.sha }} - just push-docker \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index d11f881..1cad7a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "qwit" version = "1.3.1" edition = "2021" +authors = ["Silen Locatelli"] license-file = "LICENSE" repository = "https://github.com/Qwitqwit/qwit-cli" documentation = "https://github.com/Qwitqwit/qwit-cli" diff --git a/README.md b/README.md index 7388df1..ebe2788 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,13 @@ cargo install qwit ``` -### Code +### Docker + +```bash + docker pull ghcr.io/qwitqwit/qwit-cli:v1.3.1 +``` + +### Code with Cargo ```bash git clone https://github.com/Qwitqwit/qwit-cli @@ -25,6 +31,17 @@ ## Usage +### Native + ```bash qwit --help ``` + +### Docker + +To run a command on a file you need to mount the file first +You may abstract this into another command or into docker compose +```bash + docker run --rm -v ./testfiles/tmp/test.csv:/testfiles/tmp/test.csv -t ghcr.io/qwitqwit/qwit-cli:v1.3.1 show --source testfiles/tmp/test.csv +``` + diff --git a/justfile b/justfile index 7e5d56e..7765fb1 100644 --- a/justfile +++ b/justfile @@ -68,4 +68,9 @@ release *args: verify # example how to run it, you need to build it first obv. run-docker: cd distributions && just build-docker - docker run --rm -v ./testfiles/tmp/test.csv:/testfiles/tmp/test.csv -t {{image_name}}:latest show --source testfiles/tmp/test.csv \ No newline at end of file + docker run --rm -v ./testfiles/tmp/test.csv:/testfiles/tmp/test.csv -t {{image_name}}:latest show --source testfiles/tmp/test.csv + + +[windows] +wix: + \ No newline at end of file diff --git a/wix/main.wxs b/wix/main.wxs new file mode 100644 index 0000000..8693f61 --- /dev/null +++ b/wix/main.wxs @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + + + + + + + + + + + + + + + + + +