Merge pull request #475 from hannobraun/crates

Add `crates/` and `tools/` directories
This commit is contained in:
Hanno Braun 2022-04-13 16:26:42 +02:00 committed by GitHub
commit b8e7c8bb10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
110 changed files with 40 additions and 39 deletions

View File

@ -93,11 +93,11 @@ jobs:
uses: Swatinem/rust-cache@v1 uses: Swatinem/rust-cache@v1
with: with:
key: release-operator-01 key: release-operator-01
working-directory: ./release-operator working-directory: ./tools/release-operator
- name: Operator | Deduce - name: Operator | Deduce
id: release id: release
working-directory: ./release-operator working-directory: ./tools/release-operator
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_LABEL: release RELEASE_LABEL: release
@ -130,19 +130,19 @@ jobs:
- name: Release | Crates.io - name: Release | Crates.io
if: ${{ steps.release.outputs.release-detected == 'true' }} if: ${{ steps.release.outputs.release-detected == 'true' }}
working-directory: ./release-operator working-directory: ./tools/release-operator
env: env:
RUST_LOG: info RUST_LOG: info
run: | run: |
# Publish to crates.io # Publish to crates.io
cargo run -- publish \ cargo run -- publish \
--token ${{ secrets.CARGO_REGISTRY_TOKEN }} \ --token ${{ secrets.CARGO_REGISTRY_TOKEN }} \
--crate ../fj-app \ --crate ../crates/fj-app \
--crate ../fj-export \ --crate ../crates/fj-export \
--crate ../fj-host \ --crate ../crates/fj-host \
--crate ../fj-interop \ --crate ../crates/fj-interop \
--crate ../fj-kernel \ --crate ../crates/fj-kernel \
--crate ../fj-math \ --crate ../crates/fj-math \
--crate ../fj-operations \ --crate ../crates/fj-operations \
--crate ../fj-viewer \ --crate ../crates/fj-viewer \
--crate ../fj --crate ../crates/fj

View File

@ -1,30 +1,30 @@
[workspace] [workspace]
resolver = "2" resolver = "2"
members = [ members = [
"fj", "crates/fj",
"fj-app", "crates/fj-app",
"fj-export", "crates/fj-export",
"fj-host", "crates/fj-host",
"fj-interop", "crates/fj-interop",
"fj-kernel", "crates/fj-kernel",
"fj-math", "crates/fj-math",
"fj-operations", "crates/fj-operations",
"fj-viewer", "crates/fj-viewer",
"models/cuboid", "models/cuboid",
"models/group", "models/group",
"models/spacer", "models/spacer",
"models/star", "models/star",
"release-operator", "tools/release-operator",
] ]
default-members = [ default-members = [
"fj-app", "crates/fj-app",
"fj-export", "crates/fj-export",
"fj-host", "crates/fj-host",
"fj-interop", "crates/fj-interop",
"fj-kernel", "crates/fj-kernel",
"fj-math", "crates/fj-math",
"fj-operations", "crates/fj-operations",
"fj-viewer", "crates/fj-viewer",
] ]

View File

@ -47,7 +47,7 @@ In the release branch, update the version numbers in the `Cargo.toml` files of a
Push the release branch and create a pull request and label it as `release`. Once the CI build completed successfully, merge the pull-request and mention the new version in the commit, e.g. `Release v0.1.2`. Push the release branch and create a pull request and label it as `release`. Once the CI build completed successfully, merge the pull-request and mention the new version in the commit, e.g. `Release v0.1.2`.
The [release-operator](./release-operator) will run in the scope of GitHub Actions' [CD](./.github/workflows/cd.yml) workflow. It will yield a set of compiled binaries, their checksums and a new GitHub Release with all artifacts attached. The [release-operator](./tools/release-operator) will run in the scope of GitHub Actions' [CD](./.github/workflows/cd.yml) workflow. It will yield a set of compiled binaries, their checksums and a new GitHub Release with all artifacts attached.
Next, publish the release by running `cargo publish` for each crate. Next, publish the release by running `cargo publish` for each crate.

View File

@ -3,7 +3,7 @@ mod config;
use std::path::PathBuf; use std::path::PathBuf;
use anyhow::anyhow; use anyhow::{anyhow, Context as _};
use fj_export::export; use fj_export::export;
use fj_host::{Model, Parameters}; use fj_host::{Model, Parameters};
use fj_operations::shape_processor::ShapeProcessor; use fj_operations::shape_processor::ShapeProcessor;
@ -39,7 +39,8 @@ fn main() -> anyhow::Result<()> {
})?; })?;
path.push(model); path.push(model);
let model = Model::from_path(path, config.target_dir)?; let model = Model::from_path(path.clone(), config.target_dir)
.with_context(|| format!("Failed to load model: {}", path.display()))?;
let parameters = args.parameters.unwrap_or_else(Parameters::empty); let parameters = args.parameters.unwrap_or_else(Parameters::empty);
let shape_processor = ShapeProcessor { let shape_processor = ShapeProcessor {

Some files were not shown because too many files have changed in this diff Show More