Compare commits

...

42 Commits

Author SHA1 Message Date
040f97dfb8 Merge branch 'main' into feat/lint-pr 2023-02-19 12:52:49 +01:00
8c66f3a076 feat(ci): lint pr 2023-02-19 12:52:32 +01:00
691ecfbf52 feat(ci): ci with dagger v0.2.2 2023-02-19 12:44:03 +01:00
e921ba1363 Release dagger-sdk v0.2.2 2023-02-19 12:30:59 +01:00
1638f15fba Release dagger-core v0.2.2, dagger-codegen v0.2.2, dagger-rs v0.2.8 2023-02-19 12:27:28 +01:00
10bc6f3846 fix(sdk): fixed fmt errors 2023-02-19 12:23:20 +01:00
6e5f407432 feat(sdk): update to dagger v0.3.12 2023-02-19 12:23:20 +01:00
3cb83bb79c with bin cache 2023-02-19 11:47:55 +01:00
Renovate Bot
199fe16dbf fix(deps): update rust crate dagger-sdk to 0.2.1 2023-02-18 17:34:50 +01:00
3cfd032a85 add cache 2023-02-18 17:13:41 +01:00
83ae5b476a fix(ci): fix github secret naming 2023-02-18 17:05:40 +01:00
60dfad0aaa run everywhere 2023-02-18 17:04:40 +01:00
25fb9d4f24 fix(ci): with secret 2023-02-18 17:03:37 +01:00
f42da8416a feat(ci): with sccache 2023-02-18 16:57:35 +01:00
98781f2496 test change 2023-02-18 16:06:34 +01:00
aa0c397b15 Release dagger-sdk v0.2.1 2023-02-18 16:05:10 +01:00
11a5247933 add dagger-sdk changelog 2023-02-18 16:04:39 +01:00
20c71189f6 Release dagger-rs v0.2.7, dagger-sdk v0.2.1 2023-02-18 16:03:59 +01:00
d72313051b fix: with test changes 2023-02-18 15:57:16 +01:00
a2036838de Release dagger-rs v0.2.6 2023-02-18 15:19:42 +01:00
4ebe0d12b5 fix: cleanup 2023-02-18 15:19:38 +01:00
084ffafa3e Release dagger-rs v0.2.5 2023-02-18 15:18:47 +01:00
5c9ab3756b Release dagger-rs v0.2.4 2023-02-18 15:16:56 +01:00
4ac89b6457 fix: trying agian 2023-02-18 15:16:51 +01:00
4b9f1e4320 Release dagger-rs v0.2.3 2023-02-18 15:11:38 +01:00
3a45202a21 feat: some test 2023-02-18 15:11:29 +01:00
7c8d8a3e9c Release dagger-rs v0.2.2 2023-02-18 15:09:24 +01:00
0470093912 with test commit 2023-02-18 15:09:08 +01:00
4d60d25a1f feature: trying smart-release 2023-02-18 15:08:28 +01:00
1332bc842c Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 2023-02-18 15:05:46 +01:00
a064684fcf add changelogs 2023-02-18 15:05:42 +01:00
922ad3a794 Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 2023-02-18 15:05:24 +01:00
a7d97c2342 update changelog 2023-02-18 15:05:18 +01:00
f4a20fda79 Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 2023-02-18 15:04:11 +01:00
32665d8fa0 add color eyre 2023-02-18 15:03:57 +01:00
03e022fcac feature with workspace (#8)
* add ci

* with description

* fix warnings

* with actual test

* leave out tests for now as they rely on dind

* with workspace
2023-02-18 00:48:59 +00:00
4ce58a418c add ci (#7)
* add ci

* with description

* fix warnings

* with actual test

* leave out tests for now as they rely on dind
2023-02-18 00:34:04 +00:00
468bca4a69 add ci 2023-02-17 23:10:52 +01:00
d60c8f0a79 v0.2.6 2023-02-17 23:06:26 +01:00
8fa33e9aeb remove with commit 2023-02-17 23:05:28 +01:00
789b0e69c8 fix(deps): update all dependencies (#5)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
2023-02-17 23:00:42 +01:00
44e125e00c fix: wip action 2023-02-17 19:14:40 +01:00
19 changed files with 1071 additions and 115 deletions

31
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: ci
on:
pull_request:
push:
branches:
- "main"
env:
CARGO_TERM_COLOR: always
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Update rust toolchain
run: rustup update stable && rustup default stable
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: "~/.cargo/bin/\n~/.cargo/registry/index/\n~/.cargo/registry/cache/\n~/.cargo/git/db/\ntarget/"
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.0.0
- name: Run dagger [CI]
run: cargo run -p ci -- pr

View File

@@ -1,21 +0,0 @@
name: Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
# (Optional) Path to changelog.
changelog: CHANGELOG.md
# (Optional) Create a draft release.
# [default value: false]
draft: true
# (Required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,23 +0,0 @@
name: Deploy
on:
workflow_dispatch:
push:
branches:
- "main"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Get Next Version
id: semver
uses: ietf-tools/semver-action@v1
with:
token: ${{ github.token }}
branch: main
- uses: rickstaa/action-create-tag@v1
with:
tag: ${{ steps.semver.outputs.next }}
message: ${{ steps.semver.outputs.next }}
github_token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}

15
.github/workflows/lint-pr.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: "Lint PR"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,4 +1,215 @@
## 0.2.0 - 2023-02-17
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v0.2.8 (2023-02-19)
### New Features
- <csr-id-f42da8416a5450c7c3c924353c3cc9112afd18f0/> with sccache
### Commit Statistics
<csr-read-only-do-not-edit/>
- 2 commits contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- with sccache ([`f42da84`](https://github.com/kjuulh/dagger-rs/commit/f42da8416a5450c7c3c924353c3cc9112afd18f0))
- test change ([`98781f2`](https://github.com/kjuulh/dagger-rs/commit/98781f2496deaea4bc13c9e90e60543b7daac9d7))
</details>
## v0.2.7 (2023-02-18)
### Bug Fixes
- <csr-id-d72313051b9b46a6eeaa909a11850b3d8fc75e81/> with test changes
### Commit Statistics
<csr-read-only-do-not-edit/>
- 1 commit contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- with test changes ([`d723130`](https://github.com/kjuulh/dagger-rs/commit/d72313051b9b46a6eeaa909a11850b3d8fc75e81))
</details>
## v0.2.6 (2023-02-18)
With smart releaser
### Bug Fixes
- <csr-id-4ebe0d12b50028a8b79d8c76a2257c9c2b7b3429/> cleanup
### Commit Statistics
<csr-read-only-do-not-edit/>
- 1 commit contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- cleanup ([`4ebe0d1`](https://github.com/kjuulh/dagger-rs/commit/4ebe0d12b50028a8b79d8c76a2257c9c2b7b3429))
</details>
## v0.2.5 (2023-02-18)
### Bug Fixes
- <csr-id-4ac89b645712dd8c357832a817af131c2d2e0686/> trying agian
### Commit Statistics
<csr-read-only-do-not-edit/>
- 1 commit contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- trying agian ([`4ac89b6`](https://github.com/kjuulh/dagger-rs/commit/4ac89b645712dd8c357832a817af131c2d2e0686))
</details>
## v0.2.4 (2023-02-18)
### Bug Fixes
- <csr-id-4ac89b645712dd8c357832a817af131c2d2e0686/> trying agian
## v0.2.3 (2023-02-18)
### New Features
- <csr-id-3a45202a21b24d8331a2ead72944df9ac7c70839/> some test
### Commit Statistics
<csr-read-only-do-not-edit/>
- 1 commit contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- some test ([`3a45202`](https://github.com/kjuulh/dagger-rs/commit/3a45202a21b24d8331a2ead72944df9ac7c70839))
</details>
## v0.2.2 (2023-02-18)
### Commit Statistics
<csr-read-only-do-not-edit/>
- 1 commit contributed to the release.
- 0 commits were understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- with test commit ([`0470093`](https://github.com/kjuulh/dagger-rs/commit/0470093912622640913ac34661be72a546dd1ba5))
</details>
## v0.2.1 (2023-02-18)
### Commit Statistics
<csr-read-only-do-not-edit/>
- 1 commit contributed to the release.
- 0 commits were understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- add color eyre ([`32665d8`](https://github.com/kjuulh/dagger-rs/commit/32665d8fa0c97d39a1b43c5e8343f23e87497c16))
</details>
## v0.2.0 (2023-02-17)
### Commit Statistics
<csr-read-only-do-not-edit/>
- 19 commits contributed to the release over the course of 21 calendar days.
- 0 commits were understood as [conventional](https://www.conventionalcommits.org).
- 1 unique issue was worked on: [#6](https://github.com/kjuulh/dagger-rs/issues/6)
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
* **Uncategorized**
- move code to dagger-core ([`ec0d0b2`](https://github.com/kjuulh/dagger-rs/commit/ec0d0b22e646c97acb3ce93f3afb3ddb8590e68f))
- add fields ([`496a687`](https://github.com/kjuulh/dagger-rs/commit/496a687bc34f7c58cc86df60c183be741b0b8a9c))
- with codegen output ([`0bf6b0e`](https://github.com/kjuulh/dagger-rs/commit/0bf6b0e91ecc31c1f6b51338234137eb185810a0))
- added scalars ([`e587414`](https://github.com/kjuulh/dagger-rs/commit/e5874141b3b6256b7ac2a0bf653089fa7bcc5d14))
- split out codegen parts ([`3263f1d`](https://github.com/kjuulh/dagger-rs/commit/3263f1d589aee78065401c666533cb0cbadd06ce))
- add collection of types ([`7433453`](https://github.com/kjuulh/dagger-rs/commit/7433453c6dd1447f8ad09c06c13a02cfac5ace05))
- with type filtering ([`2eb5d98`](https://github.com/kjuulh/dagger-rs/commit/2eb5d98c8a28ab8dfdc4eb959809191bc483bd08))
- with fixes ([`3eb8914`](https://github.com/kjuulh/dagger-rs/commit/3eb891422fa1404f88cfe259bddbb67e2843f1d3))
- add todo for not dropping proc ([`b63c44a`](https://github.com/kjuulh/dagger-rs/commit/b63c44adedfa0c8ef4899198bea75a5744570a87))
- can get schema ([`06fd730`](https://github.com/kjuulh/dagger-rs/commit/06fd730a1c23af88eaffa1dde8acdea202247f91))
- with session ([`83ecbd2`](https://github.com/kjuulh/dagger-rs/commit/83ecbd238ab87396c9645cb93741e89a34c92766))
- with engine ([`ee655d0`](https://github.com/kjuulh/dagger-rs/commit/ee655d02ef9670b2c0cbaa600c3e2af9f54dbf65))
- Can download dagger ([`1e88bb3`](https://github.com/kjuulh/dagger-rs/commit/1e88bb327035bd156588716202b8d982a50c114c))
- with out keeper ([`59e59fd`](https://github.com/kjuulh/dagger-rs/commit/59e59fd55d17f7e24ccb3c64471bf82332af5a21))
- more allow dead_code ([`a804dd9`](https://github.com/kjuulh/dagger-rs/commit/a804dd97a6ed08ad51c8552bc5d4c845491dca1c))
- allow dead_code ([`e2d32ed`](https://github.com/kjuulh/dagger-rs/commit/e2d32ede7621123a3db9d5e2cd3e7d276d0b5e2f))
- without integration ([`b6186aa`](https://github.com/kjuulh/dagger-rs/commit/b6186aa9015f8ddb5d59d1346a2cdc935a26d061))
- Add base sdk ([`078e2d9`](https://github.com/kjuulh/dagger-rs/commit/078e2d9c2c43fc2b4752ab1dcf4627c840009992))
</details>
First actual useful version of dagger-sdk. contains code for codegen, cli, and
core.

200
Cargo.lock generated
View File

@@ -2,6 +2,15 @@
# It is not intended for manual editing.
version = 3
[[package]]
name = "addr2line"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
dependencies = [
"gimli",
]
[[package]]
name = "adler"
version = "1.0.2"
@@ -33,6 +42,21 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "backtrace"
version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca"
dependencies = [
"addr2line",
"cc",
"cfg-if",
"libc",
"miniz_oxide",
"object",
"rustc-demangle",
]
[[package]]
name = "base64"
version = "0.21.0"
@@ -84,11 +108,21 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "ci"
version = "0.1.0"
dependencies = [
"clap",
"color-eyre",
"dagger-sdk 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"eyre",
]
[[package]]
name = "clap"
version = "4.1.4"
version = "4.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76"
checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3"
dependencies = [
"bitflags",
"clap_lex",
@@ -106,6 +140,33 @@ dependencies = [
"os_str_bytes",
]
[[package]]
name = "color-eyre"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204"
dependencies = [
"backtrace",
"color-spantrace",
"eyre",
"indenter",
"once_cell",
"owo-colors",
"tracing-error",
]
[[package]]
name = "color-spantrace"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ba75b3d9449ecdccb27ecbc479fdc0b87fa2dd43d2f8298f9bf0e59aacc8dce"
dependencies = [
"once_cell",
"owo-colors",
"tracing-core",
"tracing-error",
]
[[package]]
name = "combine"
version = "3.8.1"
@@ -184,10 +245,10 @@ dependencies = [
[[package]]
name = "dagger-codegen"
version = "0.2.0"
version = "0.2.2"
dependencies = [
"convert_case",
"dagger-core",
"dagger-core 0.2.2",
"eyre",
"genco",
"itertools",
@@ -198,7 +259,31 @@ dependencies = [
[[package]]
name = "dagger-core"
version = "0.2.0"
version = "0.2.2"
dependencies = [
"clap",
"dirs",
"eyre",
"flate2",
"genco",
"graphql-introspection-query",
"graphql_client",
"hex",
"hex-literal",
"platform-info",
"reqwest",
"serde",
"serde_json",
"sha2",
"tar",
"tempfile",
]
[[package]]
name = "dagger-core"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7efe798e1fe0d882e335aab8928d5deaafb0d27869b69ec7e9e4686548e11753"
dependencies = [
"clap",
"dirs",
@@ -220,11 +305,12 @@ dependencies = [
[[package]]
name = "dagger-rs"
version = "0.2.0"
version = "0.2.8"
dependencies = [
"clap",
"color-eyre",
"dagger-codegen",
"dagger-core",
"dagger-core 0.2.2",
"dirs",
"eyre",
"flate2",
@@ -244,10 +330,10 @@ dependencies = [
[[package]]
name = "dagger-sdk"
version = "0.2.0"
version = "0.2.2"
dependencies = [
"base64",
"dagger-core",
"dagger-core 0.2.2",
"eyre",
"futures",
"genco",
@@ -259,6 +345,24 @@ dependencies = [
"tokio",
]
[[package]]
name = "dagger-sdk"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1562df6d7d47fbb891331896ec9c04da1db129c1a9f073c40c33ab918f06e99"
dependencies = [
"base64",
"dagger-core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"eyre",
"futures",
"genco",
"gql_client",
"pretty_assertions",
"serde",
"serde_json",
"tokio",
]
[[package]]
name = "diff"
version = "0.1.13"
@@ -535,6 +639,12 @@ dependencies = [
"wasi",
]
[[package]]
name = "gimli"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
[[package]]
name = "gql_client"
version = "1.0.7"
@@ -925,6 +1035,15 @@ dependencies = [
"libc",
]
[[package]]
name = "object"
version = "0.30.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
version = "1.17.0"
@@ -991,6 +1110,12 @@ dependencies = [
"winapi",
]
[[package]]
name = "owo-colors"
version = "3.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
[[package]]
name = "parking_lot"
version = "0.12.1"
@@ -1189,6 +1314,12 @@ dependencies = [
"winreg",
]
[[package]]
name = "rustc-demangle"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
[[package]]
name = "rustix"
version = "0.36.7"
@@ -1269,9 +1400,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.92"
version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7434af0dc1cbd59268aa98b4c22c131c0584d2232f6fb166efb993e2832e896a"
checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76"
dependencies = [
"itoa",
"ryu",
@@ -1301,6 +1432,15 @@ dependencies = [
"digest",
]
[[package]]
name = "sharded-slab"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
dependencies = [
"lazy_static",
]
[[package]]
name = "signal-hook-registry"
version = "1.4.0"
@@ -1406,6 +1546,16 @@ dependencies = [
"syn",
]
[[package]]
name = "thread_local"
version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
dependencies = [
"cfg-if",
"once_cell",
]
[[package]]
name = "tinyvec"
version = "1.6.0"
@@ -1500,6 +1650,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a"
dependencies = [
"once_cell",
"valuable",
]
[[package]]
name = "tracing-error"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
dependencies = [
"tracing",
"tracing-subscriber",
]
[[package]]
name = "tracing-subscriber"
version = "0.3.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70"
dependencies = [
"sharded-slab",
"thread_local",
"tracing-core",
]
[[package]]
@@ -1561,6 +1733,12 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "valuable"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
[[package]]
name = "vcpkg"
version = "0.2.15"

View File

@@ -1,6 +1,6 @@
[package]
name = "dagger-rs"
version = "0.2.0"
version = "0.2.8"
edition = "2021"
readme = "README.md"
license-file = "LICENSE.MIT"
@@ -11,13 +11,18 @@ publish = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[workspace]
members = ["crates/dagger-codegen", "crates/dagger-sdk", "crates/dagger-core"]
members = [
"crates/dagger-codegen",
"crates/dagger-sdk",
"crates/dagger-core",
"ci",
]
[dependencies]
dagger-codegen = { path = "crates/dagger-codegen", version = "0.2.0" }
dagger-core = { path = "crates/dagger-core", version = "0.2.0" }
dagger-codegen = { path = "crates/dagger-codegen", version = "^0.2.2" }
dagger-core = { path = "crates/dagger-core", version = "^0.2.2" }
clap = "4.1.4"
clap = "4.1.6"
dirs = "4.0.0"
eyre = "0.6.8"
flate2 = { version = "1.0.25", features = ["zlib"] }
@@ -32,7 +37,8 @@ hex-literal = "0.3.4"
platform-info = "1.0.2"
reqwest = { version = "0.11.14", features = ["stream", "blocking", "deflate"] }
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.91"
serde_json = "1.0.93"
sha2 = "0.10.6"
tar = "0.4.38"
tempfile = "3.3.0"
color-eyre = "0.6.2"

12
ci/Cargo.toml Normal file
View File

@@ -0,0 +1,12 @@
[package]
name = "ci"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
clap = "4.1.6"
color-eyre = "0.6.2"
dagger-sdk = "0.2.2"
eyre = "0.6.8"

230
ci/src/main.rs Normal file
View File

@@ -0,0 +1,230 @@
use std::sync::Arc;
use dagger_sdk::gen::{Container, HostDirectoryOpts, Query};
fn main() -> eyre::Result<()> {
color_eyre::install().unwrap();
let matches = clap::Command::new("ci")
.subcommand_required(true)
.subcommand(clap::Command::new("pr"))
.subcommand(clap::Command::new("release"))
.get_matches();
let client = dagger_sdk::client::connect()?;
match matches.subcommand() {
Some(("pr", _)) => {
let base = select_base_image(client.clone());
return validate_pr(client, base);
}
Some(("release", subm)) => return release(client, subm),
Some(_) => {
panic!("invalid subcommand selected!")
}
None => {
panic!("no command selected!")
}
}
}
fn release(client: Arc<Query>, subm: &clap::ArgMatches) -> Result<(), color_eyre::Report> {
let src_dir = client.host().directory(
".".into(),
Some(HostDirectoryOpts {
exclude: Some(vec!["target/".into()]),
include: None,
}),
);
let base_image = client
.container(None)
.from("rust:latest".into())
.with_workdir("app".into())
.with_mounted_directory("/app/".into(), src_dir.id());
let container = base_image
.with_exec(
vec![
"cargo".into(),
"install".into(),
"cargo-smart-release".into(),
],
None,
)
.with_exec(
vec![
"cargo".into(),
"smart-release".into(),
"--execute".into(),
"--allow-fully-generated-changelogs".into(),
"--no-changelog-preview".into(),
"dagger-rs".into(),
"dagger-sdk".into(),
],
None,
);
let exit = container.exit_code();
if exit != 0 {
eyre::bail!("container failed with non-zero exit code");
}
println!("released pr succeeded!");
Ok(())
}
fn get_dependencies(client: Arc<Query>) -> Container {
let cargo_dir = client.host().directory(
".".into(),
Some(HostDirectoryOpts {
exclude: None,
include: Some(vec![
"**/Cargo.lock".into(),
"**/Cargo.toml".into(),
"**/main.rs".into(),
"**/lib.rs".into(),
]),
}),
);
let src_dir = client.host().directory(
".".into(),
Some(HostDirectoryOpts {
exclude: Some(vec!["target/".into()]),
include: None,
}),
);
let cache_cargo_index_dir = client.cache_volume("cargo_index".into());
let cache_cargo_deps = client.cache_volume("cargo_deps".into());
let cache_cargo_bin = client.cache_volume("cargo_bin_cache".into());
let minio_url = "https://github.com/mozilla/sccache/releases/download/v0.3.3/sccache-v0.3.3-x86_64-unknown-linux-musl.tar.gz".into();
let base_image = client
.container(None)
.from("rust:latest".into())
.with_workdir("app".into())
.with_exec(vec!["apt-get".into(), "update".into()], None)
.with_exec(
vec![
"apt-get".into(),
"install".into(),
"--yes".into(),
"libpq-dev".into(),
"wget".into(),
],
None,
)
.with_exec(vec!["wget".into(), minio_url], None)
.with_exec(
vec![
"tar".into(),
"xzf".into(),
"sccache-v0.3.3-x86_64-unknown-linux-musl.tar.gz".into(),
],
None,
)
.with_exec(
vec![
"mv".into(),
"sccache-v0.3.3-x86_64-unknown-linux-musl/sccache".into(),
"/usr/local/bin/sccache".into(),
],
None,
)
.with_exec(
vec!["chmod".into(), "+x".into(), "/usr/local/bin/sccache".into()],
None,
)
.with_env_variable("RUSTC_WRAPPER".into(), "/usr/local/bin/sccache".into())
.with_env_variable(
"AWS_ACCESS_KEY_ID".into(),
std::env::var("AWS_ACCESS_KEY_ID").unwrap_or("".into()),
)
.with_env_variable(
"AWS_SECRET_ACCESS_KEY".into(),
std::env::var("AWS_SECRET_ACCESS_KEY").unwrap_or("".into()),
)
.with_env_variable("SCCACHE_BUCKET".into(), "sccache".into())
.with_env_variable("SCCACHE_REGION".into(), "auto".into())
.with_env_variable(
"SCCACHE_ENDPOINT".into(),
"https://api-minio.front.kjuulh.io".into(),
)
.with_mounted_cache("~/.cargo/bin".into(), cache_cargo_bin.id(), None)
.with_mounted_cache("~/.cargo/registry/index".into(), cache_cargo_bin.id(), None)
.with_mounted_cache("~/.cargo/registry/cache".into(), cache_cargo_bin.id(), None)
.with_mounted_cache("~/.cargo/git/db".into(), cache_cargo_bin.id(), None)
.with_mounted_cache("target/".into(), cache_cargo_bin.id(), None)
.with_exec(
vec!["cargo".into(), "install".into(), "cargo-chef".into()],
None,
);
let recipe = base_image
.with_mounted_directory(".".into(), cargo_dir.id())
.with_mounted_cache(
"~/.cargo/.package-cache".into(),
cache_cargo_index_dir.id(),
None,
)
.with_exec(
vec![
"cargo".into(),
"chef".into(),
"prepare".into(),
"--recipe-path".into(),
"recipe.json".into(),
],
None,
)
.file("/app/recipe.json".into());
let builder_start = base_image
.with_mounted_file("/app/recipe.json".into(), recipe.id())
.with_exec(
vec![
"cargo".into(),
"chef".into(),
"cook".into(),
"--release".into(),
"--workspace".into(),
"--recipe-path".into(),
"recipe.json".into(),
],
None,
)
.with_mounted_cache("/app/".into(), cache_cargo_deps.id(), None)
.with_mounted_directory("/app/".into(), src_dir.id())
.with_exec(
vec![
"cargo".into(),
"build".into(),
"--all".into(),
"--release".into(),
],
None,
);
return builder_start;
}
fn select_base_image(client: Arc<Query>) -> Container {
let src_dir = get_dependencies(client.clone());
src_dir
}
fn validate_pr(_client: Arc<Query>, container: Container) -> eyre::Result<()> {
//let container = container.with_exec(vec!["cargo".into(), "test".into(), "--all".into()], None);
let exit = container.exit_code();
if exit != 0 {
eyre::bail!("container failed with non-zero exit code");
}
println!("validating pr succeeded!");
Ok(())
}

View File

@@ -0,0 +1,97 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v0.2.2 (2023-02-19)
### New Features
- <csr-id-6e5f4074329ab0462445b31d4153f8497c483438/> update to dagger v0.3.12
### Commit Statistics
<csr-read-only-do-not-edit/>
- 1 commit contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
</details>
## v0.2.1 (2023-02-18)
<csr-id-6afe141d34308f18f9d46419931d2c9b822a7aef/>
### Bug Fixes
- <csr-id-789b0e69c8c53d0e86d9cec89ab5345507aad514/> update all dependencies
### Other
- <csr-id-6afe141d34308f18f9d46419931d2c9b822a7aef/> fix
### Commit Statistics
<csr-read-only-do-not-edit/>
- 35 commits contributed to the release over the course of 20 calendar days.
- 2 commits were understood as [conventional](https://www.conventionalcommits.org).
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **[#5](https://github.com/kjuulh/dagger-rs/issues/5)**
- update all dependencies ([`789b0e6`](https://github.com/kjuulh/dagger-rs/commit/789b0e69c8c53d0e86d9cec89ab5345507aad514))
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
* **Uncategorized**
- Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`1332bc8`](https://github.com/kjuulh/dagger-rs/commit/1332bc842ce2ea0254c651419813b63b36ca590c))
- add changelogs ([`a064684`](https://github.com/kjuulh/dagger-rs/commit/a064684fcf80196188a57d9ff9067c0b5769fb09))
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
- remove toolchain ([`f034528`](https://github.com/kjuulh/dagger-rs/commit/f03452840cf9260cd1d5e5aa8d7ee2897384c745))
- with actual versions ([`7153c24`](https://github.com/kjuulh/dagger-rs/commit/7153c24f0105a05f170efd10ef2535d83ce0c87e))
- with publish ([`989d5bc`](https://github.com/kjuulh/dagger-rs/commit/989d5bc26036d46a199d939b5cbbe72aff2f8fb1))
- codegen also with repository ([`c625ae4`](https://github.com/kjuulh/dagger-rs/commit/c625ae49ba4d2112ea9d4907a6689fd8e74b808c))
- with readme and license ([`1e26b38`](https://github.com/kjuulh/dagger-rs/commit/1e26b383d4f6dbcbe20f5f7c19c749e743f6e607))
- with wildcard version ([`533b9df`](https://github.com/kjuulh/dagger-rs/commit/533b9dfef0165c514127a8437d08daf52adf5739))
- cargo version 0.2.0 ([`bec62de`](https://github.com/kjuulh/dagger-rs/commit/bec62de62ff5638428174e232a36eee3ddd0f5ef))
- bump version ([`36b0ecd`](https://github.com/kjuulh/dagger-rs/commit/36b0ecdabf4c220cffb2d0660fb6480387e3249a))
- fix all clippy ([`6be8482`](https://github.com/kjuulh/dagger-rs/commit/6be8482b461e098384bbf1371ed7d67b259197fa))
- fmt tests ([`2eb0277`](https://github.com/kjuulh/dagger-rs/commit/2eb027754b357100544fe0c8f7c5f6125e017c6f))
- add tests ([`19b46b6`](https://github.com/kjuulh/dagger-rs/commit/19b46b6cf04ff3cff49047699dea20ca784c5536))
- pull out args wip ([`c4edd29`](https://github.com/kjuulh/dagger-rs/commit/c4edd29f50b6ada2cc3afd2f4df2ec47920c4607))
- implement sort by name and type ([`d9b51c1`](https://github.com/kjuulh/dagger-rs/commit/d9b51c1ac90c00fb3af24332b6140e1201bc9be7))
- fix optional types for real ([`26069a8`](https://github.com/kjuulh/dagger-rs/commit/26069a82a69ec7265216c8ddaceb37228dd0fb81))
- fix description ([`f4581ba`](https://github.com/kjuulh/dagger-rs/commit/f4581ba4cd1693a906eaf6c58054398ceae3bfac))
- with proper optional types ([`f4a812a`](https://github.com/kjuulh/dagger-rs/commit/f4a812a7d24e9e09cb4e3cbde56ee0b3ac774b62))
- set proper option type ([`8549cfc`](https://github.com/kjuulh/dagger-rs/commit/8549cfc3a7d9f831febaeadc22db36604e465ea8))
- add fields ([`496a687`](https://github.com/kjuulh/dagger-rs/commit/496a687bc34f7c58cc86df60c183be741b0b8a9c))
- add input_fields ([`d2cddff`](https://github.com/kjuulh/dagger-rs/commit/d2cddff365c636feceb3f20a73df812fcab11a19))
- with objects ([`5fef514`](https://github.com/kjuulh/dagger-rs/commit/5fef5148010f384d0158361d64b8e17d357d4819))
- remove hardcoded test ([`910ff4a`](https://github.com/kjuulh/dagger-rs/commit/910ff4a72e10f5384287fed35f56bc7f662e7ccd))
- fix ([`6afe141`](https://github.com/kjuulh/dagger-rs/commit/6afe141d34308f18f9d46419931d2c9b822a7aef))
- formatting ([`3a7ee33`](https://github.com/kjuulh/dagger-rs/commit/3a7ee33e1ed317288b2022ea5a4ce721d59fb11e))
- remove dummy string ([`e7f6560`](https://github.com/kjuulh/dagger-rs/commit/e7f6560247768afbca0c350df7d4ccf3909b74fa))
- with input objects ([`dc53fc1`](https://github.com/kjuulh/dagger-rs/commit/dc53fc1d474b549bb1c580865a049e2fac2f5e6d))
- with enum ([`2a1f7c3`](https://github.com/kjuulh/dagger-rs/commit/2a1f7c3f2666f1f4caebf7c22707709741c2cfad))
- with codegen output ([`0bf6b0e`](https://github.com/kjuulh/dagger-rs/commit/0bf6b0e91ecc31c1f6b51338234137eb185810a0))
- added scalars ([`e587414`](https://github.com/kjuulh/dagger-rs/commit/e5874141b3b6256b7ac2a0bf653089fa7bcc5d14))
- with scalars ([`0d6e6e5`](https://github.com/kjuulh/dagger-rs/commit/0d6e6e57ae6a3b8a1f450d719c9973130af873b7))
- split out codegen parts ([`3263f1d`](https://github.com/kjuulh/dagger-rs/commit/3263f1d589aee78065401c666533cb0cbadd06ce))
</details>

View File

@@ -1,6 +1,6 @@
[package]
name = "dagger-codegen"
version = "0.2.0"
version = "0.2.2"
edition = "2021"
readme = "README.md"
license-file = "LICENSE.MIT"
@@ -11,11 +11,11 @@ publish = true
[dependencies]
convert_case = "0.6.0"
dagger-core = { path = "../dagger-core", version = "0.2.0" }
dagger-core = { path = "../dagger-core", version = "^0.2.2" }
eyre = "0.6.8"
genco = "0.17.3"
itertools = "0.10.5"
pretty_assertions = "1.3.0"
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.91"
serde_json = "1.0.93"

View File

@@ -10,7 +10,7 @@ fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
.map(|values| {
values
.into_iter()
.map(|val| quote! { $(val.name.as_ref()) })
.map(|val| quote! { $(val.name.as_ref()), })
})
.flatten()
.collect::<Vec<_>>();
@@ -25,7 +25,10 @@ fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
}
pub fn render_enum(t: &FullType) -> eyre::Result<rust::Tokens> {
let serialize = rust::import("serde", "Serialize");
Ok(quote! {
#[derive($serialize)]
pub enum $(t.name.as_ref()) {
$(render_enum_values(t))
}

View File

@@ -0,0 +1,72 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v0.2.2 (2023-02-19)
### New Features
- <csr-id-6e5f4074329ab0462445b31d4153f8497c483438/> update to dagger v0.3.12
### Commit Statistics
<csr-read-only-do-not-edit/>
- 1 commit contributed to the release.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
</details>
## v0.2.1 (2023-02-18)
### Bug Fixes
- <csr-id-789b0e69c8c53d0e86d9cec89ab5345507aad514/> update all dependencies
### Commit Statistics
<csr-read-only-do-not-edit/>
- 16 commits contributed to the release over the course of 19 calendar days.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **[#5](https://github.com/kjuulh/dagger-rs/issues/5)**
- update all dependencies ([`789b0e6`](https://github.com/kjuulh/dagger-rs/commit/789b0e69c8c53d0e86d9cec89ab5345507aad514))
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
* **Uncategorized**
- Release dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`1332bc8`](https://github.com/kjuulh/dagger-rs/commit/1332bc842ce2ea0254c651419813b63b36ca590c))
- add changelogs ([`a064684`](https://github.com/kjuulh/dagger-rs/commit/a064684fcf80196188a57d9ff9067c0b5769fb09))
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
- with publish ([`989d5bc`](https://github.com/kjuulh/dagger-rs/commit/989d5bc26036d46a199d939b5cbbe72aff2f8fb1))
- with repo ([`e5383b5`](https://github.com/kjuulh/dagger-rs/commit/e5383b51f3b290a87b729929c377e93bda3873e0))
- with readme and license ([`1e26b38`](https://github.com/kjuulh/dagger-rs/commit/1e26b383d4f6dbcbe20f5f7c19c749e743f6e607))
- bump version ([`36b0ecd`](https://github.com/kjuulh/dagger-rs/commit/36b0ecdabf4c220cffb2d0660fb6480387e3249a))
- with println ([`d1726a0`](https://github.com/kjuulh/dagger-rs/commit/d1726a052a6dc4e57f364864446cab3cbda7e0bf))
- context and querier done ([`52a0db3`](https://github.com/kjuulh/dagger-rs/commit/52a0db3e311f9f88447882f1406701d4cd612b1c))
- tested full flow initially ([`7a008be`](https://github.com/kjuulh/dagger-rs/commit/7a008be59e5ca183809e5840cdfae1d87665aa20))
- move code to dagger-core ([`ec0d0b2`](https://github.com/kjuulh/dagger-rs/commit/ec0d0b22e646c97acb3ce93f3afb3ddb8590e68f))
- add fields ([`496a687`](https://github.com/kjuulh/dagger-rs/commit/496a687bc34f7c58cc86df60c183be741b0b8a9c))
- with objects ([`5fef514`](https://github.com/kjuulh/dagger-rs/commit/5fef5148010f384d0158361d64b8e17d357d4819))
- with enum ([`2a1f7c3`](https://github.com/kjuulh/dagger-rs/commit/2a1f7c3f2666f1f4caebf7c22707709741c2cfad))
</details>

View File

@@ -1,6 +1,6 @@
[package]
name = "dagger-core"
version = "0.2.0"
version = "0.2.2"
edition = "2021"
readme = "README.md"
license-file = "LICENSE.MIT"
@@ -10,7 +10,7 @@ publish = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
clap = "4.1.4"
clap = "4.1.6"
dirs = "4.0.0"
eyre = "0.6.8"
flate2 = { version = "1.0.25", features = ["zlib"] }
@@ -25,7 +25,7 @@ hex-literal = "0.3.4"
platform-info = "1.0.2"
reqwest = { version = "0.11.14", features = ["stream", "blocking", "deflate"] }
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.91"
serde_json = "1.0.93"
sha2 = "0.10.6"
tar = "0.4.38"
tempfile = "3.3.0"

View File

@@ -12,7 +12,7 @@ impl Engine {
}
fn from_cli(&self, cfg: &Config) -> eyre::Result<(ConnectParams, Child)> {
let cli = Downloader::new("0.3.10".into())?.get_cli()?;
let cli = Downloader::new("0.3.12".into())?.get_cli()?;
let cli_session = CliSession::new();

View File

@@ -0,0 +1,102 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v0.2.2 (2023-02-19)
### New Features
- <csr-id-6e5f4074329ab0462445b31d4153f8497c483438/> update to dagger v0.3.12
### Bug Fixes
- <csr-id-10bc6f3846b65cc82c2fb343d8cfe921784bef1b/> fixed fmt errors
### Commit Statistics
<csr-read-only-do-not-edit/>
- 3 commits contributed to the release.
- 2 commits were understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **Uncategorized**
- Release dagger-core v0.2.2, dagger-codegen v0.2.2, dagger-rs v0.2.8 ([`1638f15`](https://github.com/kjuulh/dagger-rs/commit/1638f15fba9d16512e8452f87b908d6dce417cd9))
- fixed fmt errors ([`10bc6f3`](https://github.com/kjuulh/dagger-rs/commit/10bc6f3846b65cc82c2fb343d8cfe921784bef1b))
- update to dagger v0.3.12 ([`6e5f407`](https://github.com/kjuulh/dagger-rs/commit/6e5f4074329ab0462445b31d4153f8497c483438))
</details>
## v0.2.1 (2023-02-18)
### Bug Fixes
- <csr-id-789b0e69c8c53d0e86d9cec89ab5345507aad514/> update all dependencies
### Commit Statistics
<csr-read-only-do-not-edit/>
- 40 commits contributed to the release over the course of 20 calendar days.
- 1 commit was understood as [conventional](https://www.conventionalcommits.org).
- 2 unique issues were worked on: [#5](https://github.com/kjuulh/dagger-rs/issues/5), [#6](https://github.com/kjuulh/dagger-rs/issues/6)
### Commit Details
<csr-read-only-do-not-edit/>
<details><summary>view details</summary>
* **[#5](https://github.com/kjuulh/dagger-rs/issues/5)**
- update all dependencies ([`789b0e6`](https://github.com/kjuulh/dagger-rs/commit/789b0e69c8c53d0e86d9cec89ab5345507aad514))
* **[#6](https://github.com/kjuulh/dagger-rs/issues/6)**
- feature/add impl ([`4a4c03f`](https://github.com/kjuulh/dagger-rs/commit/4a4c03f3c2ee7f6268c65976715e70767b4ea78d))
* **Uncategorized**
- Release dagger-sdk v0.2.1 ([`aa0c397`](https://github.com/kjuulh/dagger-rs/commit/aa0c397b15566840eb59ca6186c083f631cc460b))
- add dagger-sdk changelog ([`11a5247`](https://github.com/kjuulh/dagger-rs/commit/11a5247933736bc6a4c5300c29599c88597fefb7))
- Release dagger-rs v0.2.7, dagger-sdk v0.2.1 ([`20c7118`](https://github.com/kjuulh/dagger-rs/commit/20c71189f6d5d978286ee16f8e958c6045756d80))
- Adjusting changelogs prior to release of dagger-core v0.2.1, dagger-codegen v0.2.1, dagger-rs v0.2.1 ([`f4a20fd`](https://github.com/kjuulh/dagger-rs/commit/f4a20fda79063b29829cc899793775ba8cb17214))
- with actual versions ([`7153c24`](https://github.com/kjuulh/dagger-rs/commit/7153c24f0105a05f170efd10ef2535d83ce0c87e))
- with publish ([`989d5bc`](https://github.com/kjuulh/dagger-rs/commit/989d5bc26036d46a199d939b5cbbe72aff2f8fb1))
- with repo ([`e5383b5`](https://github.com/kjuulh/dagger-rs/commit/e5383b51f3b290a87b729929c377e93bda3873e0))
- with wildcard version ([`533b9df`](https://github.com/kjuulh/dagger-rs/commit/533b9dfef0165c514127a8437d08daf52adf5739))
- cargo version 0.2.0 ([`bec62de`](https://github.com/kjuulh/dagger-rs/commit/bec62de62ff5638428174e232a36eee3ddd0f5ef))
- bump version ([`36b0ecd`](https://github.com/kjuulh/dagger-rs/commit/36b0ecdabf4c220cffb2d0660fb6480387e3249a))
- document usage ([`578c2a6`](https://github.com/kjuulh/dagger-rs/commit/578c2a68830eb40da888823a8770af4a764ed4c7))
- fix all clippy ([`6be8482`](https://github.com/kjuulh/dagger-rs/commit/6be8482b461e098384bbf1371ed7d67b259197fa))
- add with dockerfile ([`0cbd179`](https://github.com/kjuulh/dagger-rs/commit/0cbd1790b0b4030c68f0a0dd619325da26f14f60))
- with caching ([`728840c`](https://github.com/kjuulh/dagger-rs/commit/728840ca8e48b8bec66da4e5fa677bfa60d1d147))
- add more quickstart ([`59e2572`](https://github.com/kjuulh/dagger-rs/commit/59e2572173872c8091a0613a387a01e0cccc51bf))
- build the application ([`d894def`](https://github.com/kjuulh/dagger-rs/commit/d894def70c85ff2fc567bf614e3be6f4134965e2))
- add test-the-application ([`cb9a4dd`](https://github.com/kjuulh/dagger-rs/commit/cb9a4dd84fc13ef03ca3ad539646e95c3c047676))
- with println ([`d1726a0`](https://github.com/kjuulh/dagger-rs/commit/d1726a052a6dc4e57f364864446cab3cbda7e0bf))
- unpack response ([`3b5b59b`](https://github.com/kjuulh/dagger-rs/commit/3b5b59ba1c20cc68218dc5c0af18ff7a78f6953d))
- tested full flow initially ([`7a008be`](https://github.com/kjuulh/dagger-rs/commit/7a008be59e5ca183809e5840cdfae1d87665aa20))
- move code to dagger-core ([`ec0d0b2`](https://github.com/kjuulh/dagger-rs/commit/ec0d0b22e646c97acb3ce93f3afb3ddb8590e68f))
- with selection impl default ([`9f0021b`](https://github.com/kjuulh/dagger-rs/commit/9f0021b7086046c80b3f455f205149e03eb72da2))
- fix warnings ([`2b49f9c`](https://github.com/kjuulh/dagger-rs/commit/2b49f9c19098d96df2bb735253710774b0831c94))
- fix test ([`03366b7`](https://github.com/kjuulh/dagger-rs/commit/03366b7c5b3cce5ec42b5c7655843170236c56a1))
- test marshaller ([`c5dfceb`](https://github.com/kjuulh/dagger-rs/commit/c5dfcebaad9c255b10ba8c6e4d4dba00821c8941))
- test marshaller ([`c4ec6f0`](https://github.com/kjuulh/dagger-rs/commit/c4ec6f0c976ce0af2e05e818731b5e2bed7f0522))
- implement sort by name and type ([`d9b51c1`](https://github.com/kjuulh/dagger-rs/commit/d9b51c1ac90c00fb3af24332b6140e1201bc9be7))
- fix optional types for real ([`26069a8`](https://github.com/kjuulh/dagger-rs/commit/26069a82a69ec7265216c8ddaceb37228dd0fb81))
- fix description ([`f4581ba`](https://github.com/kjuulh/dagger-rs/commit/f4581ba4cd1693a906eaf6c58054398ceae3bfac))
- with proper optional types ([`f4a812a`](https://github.com/kjuulh/dagger-rs/commit/f4a812a7d24e9e09cb4e3cbde56ee0b3ac774b62))
- set proper option type ([`8549cfc`](https://github.com/kjuulh/dagger-rs/commit/8549cfc3a7d9f831febaeadc22db36604e465ea8))
- add fields ([`496a687`](https://github.com/kjuulh/dagger-rs/commit/496a687bc34f7c58cc86df60c183be741b0b8a9c))
- add input_fields ([`d2cddff`](https://github.com/kjuulh/dagger-rs/commit/d2cddff365c636feceb3f20a73df812fcab11a19))
- with objects ([`5fef514`](https://github.com/kjuulh/dagger-rs/commit/5fef5148010f384d0158361d64b8e17d357d4819))
- with enum ([`2a1f7c3`](https://github.com/kjuulh/dagger-rs/commit/2a1f7c3f2666f1f4caebf7c22707709741c2cfad))
- with codegen output ([`0bf6b0e`](https://github.com/kjuulh/dagger-rs/commit/0bf6b0e91ecc31c1f6b51338234137eb185810a0))
- split out codegen parts ([`3263f1d`](https://github.com/kjuulh/dagger-rs/commit/3263f1d589aee78065401c666533cb0cbadd06ce))
- add dagger-sdk ([`9dccb83`](https://github.com/kjuulh/dagger-rs/commit/9dccb83d94a720dd58deffe9f3e5aaea784336f3))
</details>

View File

@@ -1,6 +1,6 @@
[package]
name = "dagger-sdk"
version = "0.2.0"
version = "0.2.2"
edition = "2021"
readme = "README.md"
license-file = "LICENSE.MIT"
@@ -12,7 +12,7 @@ publish = true
[dependencies]
base64 = "0.21.0"
dagger-core = { path = "../dagger-core", version = "0.2.0" }
dagger-core = { path = "../dagger-core", version = "^0.2.2" }
eyre = "0.6.8"
futures = "0.3.26"
@@ -20,7 +20,7 @@ genco = "0.17.3"
gql_client = "1.0.7"
pretty_assertions = "1.3.0"
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.92"
serde_json = "1.0.93"
tokio = { version = "1.25.0", features = ["full"] }
[dev-dependencies]

View File

@@ -32,7 +32,7 @@ pub struct CacheVolume {
impl CacheVolume {
pub fn id(&self) -> CacheId {
let query = self.selection.select("id");
let mut query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -82,6 +82,7 @@ pub struct ContainerWithFileOpts {
}
pub struct ContainerWithMountedCacheOpts {
pub source: Option<DirectoryId>,
pub sharing: Option<CacheSharingMode>,
}
pub struct ContainerWithNewFileOpts {
pub contents: Option<String>,
@@ -112,7 +113,7 @@ impl Container {
};
}
pub fn default_args(&self) -> Vec<String> {
let query = self.selection.select("defaultArgs");
let mut query = self.selection.select("defaultArgs");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -128,7 +129,7 @@ impl Container {
};
}
pub fn entrypoint(&self) -> Vec<String> {
let query = self.selection.select("entrypoint");
let mut query = self.selection.select("entrypoint");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -140,7 +141,7 @@ impl Container {
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn env_variables(&self) -> Vec<EnvVariable> {
let query = self.selection.select("envVariables");
let mut query = self.selection.select("envVariables");
return vec![EnvVariable {
proc: self.proc.clone(),
@@ -181,7 +182,7 @@ impl Container {
};
}
pub fn exit_code(&self) -> isize {
let query = self.selection.select("exitCode");
let mut query = self.selection.select("exitCode");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -220,7 +221,7 @@ impl Container {
};
}
pub fn fs(&self) -> Directory {
let query = self.selection.select("fs");
let mut query = self.selection.select("fs");
return Directory {
proc: self.proc.clone(),
@@ -229,7 +230,7 @@ impl Container {
};
}
pub fn id(&self) -> ContainerId {
let query = self.selection.select("id");
let mut query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -241,7 +242,7 @@ impl Container {
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn labels(&self) -> Vec<Label> {
let query = self.selection.select("labels");
let mut query = self.selection.select("labels");
return vec![Label {
proc: self.proc.clone(),
@@ -250,7 +251,7 @@ impl Container {
}];
}
pub fn mounts(&self) -> Vec<String> {
let query = self.selection.select("mounts");
let mut query = self.selection.select("mounts");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -271,7 +272,7 @@ impl Container {
};
}
pub fn platform(&self) -> Platform {
let query = self.selection.select("platform");
let mut query = self.selection.select("platform");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -288,7 +289,7 @@ impl Container {
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn rootfs(&self) -> Directory {
let query = self.selection.select("rootfs");
let mut query = self.selection.select("rootfs");
return Directory {
proc: self.proc.clone(),
@@ -297,17 +298,17 @@ impl Container {
};
}
pub fn stderr(&self) -> String {
let query = self.selection.select("stderr");
let mut query = self.selection.select("stderr");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn stdout(&self) -> String {
let query = self.selection.select("stdout");
let mut query = self.selection.select("stdout");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn user(&self) -> String {
let query = self.selection.select("user");
let mut query = self.selection.select("user");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -463,6 +464,9 @@ impl Container {
if let Some(source) = opts.source {
query = query.arg("source", source).unwrap();
}
if let Some(sharing) = opts.sharing {
query = query.arg("sharing", sharing).unwrap();
}
}
return Container {
@@ -537,6 +541,24 @@ impl Container {
conn: self.conn.clone(),
};
}
pub fn with_registry_auth(
&self,
address: String,
username: String,
secret: SecretId,
) -> Container {
let mut query = self.selection.select("withRegistryAuth");
query = query.arg("address", address).unwrap();
query = query.arg("username", username).unwrap();
query = query.arg("secret", secret).unwrap();
return Container {
proc: self.proc.clone(),
selection: query,
conn: self.conn.clone(),
};
}
pub fn with_rootfs(&self, id: DirectoryId) -> Container {
let mut query = self.selection.select("withRootfs");
@@ -627,6 +649,17 @@ impl Container {
conn: self.conn.clone(),
};
}
pub fn without_registry_auth(&self, address: String) -> Container {
let mut query = self.selection.select("withoutRegistryAuth");
query = query.arg("address", address).unwrap();
return Container {
proc: self.proc.clone(),
selection: query,
conn: self.conn.clone(),
};
}
pub fn without_unix_socket(&self, path: String) -> Container {
let mut query = self.selection.select("withoutUnixSocket");
@@ -639,7 +672,7 @@ impl Container {
};
}
pub fn workdir(&self) -> String {
let query = self.selection.select("workdir");
let mut query = self.selection.select("workdir");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -753,7 +786,7 @@ impl Directory {
};
}
pub fn id(&self) -> DirectoryId {
let query = self.selection.select("id");
let mut query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -915,12 +948,12 @@ pub struct EnvVariable {
impl EnvVariable {
pub fn name(&self) -> String {
let query = self.selection.select("name");
let mut query = self.selection.select("name");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn value(&self) -> String {
let query = self.selection.select("value");
let mut query = self.selection.select("value");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -933,7 +966,7 @@ pub struct File {
impl File {
pub fn contents(&self) -> String {
let query = self.selection.select("contents");
let mut query = self.selection.select("contents");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -945,12 +978,12 @@ impl File {
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn id(&self) -> FileId {
let query = self.selection.select("id");
let mut query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn secret(&self) -> Secret {
let query = self.selection.select("secret");
let mut query = self.selection.select("secret");
return Secret {
proc: self.proc.clone(),
@@ -959,7 +992,7 @@ impl File {
};
}
pub fn size(&self) -> isize {
let query = self.selection.select("size");
let mut query = self.selection.select("size");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -988,7 +1021,7 @@ pub struct GitRefTreeOpts {
impl GitRef {
pub fn digest(&self) -> String {
let query = self.selection.select("digest");
let mut query = self.selection.select("digest");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -1030,7 +1063,7 @@ impl GitRepository {
};
}
pub fn branches(&self) -> Vec<String> {
let query = self.selection.select("branches");
let mut query = self.selection.select("branches");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -1057,7 +1090,7 @@ impl GitRepository {
};
}
pub fn tags(&self) -> Vec<String> {
let query = self.selection.select("tags");
let mut query = self.selection.select("tags");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -1146,7 +1179,7 @@ pub struct HostVariable {
impl HostVariable {
pub fn secret(&self) -> Secret {
let query = self.selection.select("secret");
let mut query = self.selection.select("secret");
return Secret {
proc: self.proc.clone(),
@@ -1155,7 +1188,7 @@ impl HostVariable {
};
}
pub fn value(&self) -> String {
let query = self.selection.select("value");
let mut query = self.selection.select("value");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -1168,12 +1201,12 @@ pub struct Label {
impl Label {
pub fn name(&self) -> String {
let query = self.selection.select("name");
let mut query = self.selection.select("name");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn value(&self) -> String {
let query = self.selection.select("value");
let mut query = self.selection.select("value");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -1186,7 +1219,7 @@ pub struct Project {
impl Project {
pub fn extensions(&self) -> Vec<Project> {
let query = self.selection.select("extensions");
let mut query = self.selection.select("extensions");
return vec![Project {
proc: self.proc.clone(),
@@ -1195,7 +1228,7 @@ impl Project {
}];
}
pub fn generated_code(&self) -> Directory {
let query = self.selection.select("generatedCode");
let mut query = self.selection.select("generatedCode");
return Directory {
proc: self.proc.clone(),
@@ -1204,22 +1237,22 @@ impl Project {
};
}
pub fn install(&self) -> bool {
let query = self.selection.select("install");
let mut query = self.selection.select("install");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn name(&self) -> String {
let query = self.selection.select("name");
let mut query = self.selection.select("name");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn schema(&self) -> String {
let query = self.selection.select("schema");
let mut query = self.selection.select("schema");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn sdk(&self) -> String {
let query = self.selection.select("sdk");
let mut query = self.selection.select("sdk");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -1278,7 +1311,7 @@ impl Query {
};
}
pub fn default_platform(&self) -> Platform {
let query = self.selection.select("defaultPlatform");
let mut query = self.selection.select("defaultPlatform");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -1325,7 +1358,7 @@ impl Query {
};
}
pub fn host(&self) -> Host {
let query = self.selection.select("host");
let mut query = self.selection.select("host");
return Host {
proc: self.proc.clone(),
@@ -1406,12 +1439,12 @@ pub struct Secret {
impl Secret {
pub fn id(&self) -> SecretId {
let query = self.selection.select("id");
let mut query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
pub fn plaintext(&self) -> String {
let query = self.selection.select("plaintext");
let mut query = self.selection.select("plaintext");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
@@ -1424,8 +1457,14 @@ pub struct Socket {
impl Socket {
pub fn id(&self) -> SocketId {
let query = self.selection.select("id");
let mut query = self.selection.select("id");
query.execute(&graphql_client(&self.conn)).unwrap().unwrap()
}
}
#[derive(Serialize)]
pub enum CacheSharingMode {
SHARED,
PRIVATE,
LOCKED,
}

View File

@@ -4,6 +4,10 @@ pub mod cli;
mod cli_generate;
fn main() -> eyre::Result<()> {
//
color_eyre::install().unwrap();
let args = std::env::args();
let args = args.collect::<Vec<String>>();
let args = args.iter().map(|s| s.as_str()).collect::<Vec<&str>>();