Skip to content

Commit

Permalink
0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
tiptenbrink committed May 16, 2024
1 parent 423a37b commit 35a28e9
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog

## 0.15.1
## 0.16.0 2024-05-16

* Significant refactor of how resolving works for run/deploy (secrets still needs to be changed). "state_root" no longer exists. An address always contains a target path, which is the state path. This state path is also what will be used to resolve the config. State resolution is no longer first merged and then resolved, but resolved only at the state path location. Argument resolution happens from the resolve root to the state path. The biggest change here is that relative paths in `tidploy.toml` are now resolved relative to themselves and not relative to the (unknown) resolve root, as this is a more natural API. This is also more similar to how things worked pre-0.14. However, execution path still defaults to the resolve root, but this can be modified by adding `execution_path = "."`.
* Local git cloning now works as it should

## 0.15.0 2024-05-07
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
@@ -1,6 +1,6 @@
[package]
name = "tidploy"
version = "0.15.0"
version = "0.16.0"
edition = "2021"
license-file="LICENSE"
authors=["Tip ten Brink"]
Expand Down
2 changes: 0 additions & 2 deletions examples/config/move_resolve/inner/alternate.sh

This file was deleted.

5 changes: 0 additions & 5 deletions examples/config/move_resolve/inner/tidploy.toml

This file was deleted.

2 changes: 2 additions & 0 deletions examples/config/run_here/also_here.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
echo "Also here!"
2 changes: 2 additions & 0 deletions examples/config/run_here/example_here.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
./also_here.sh
3 changes: 3 additions & 0 deletions examples/config/run_here/tidploy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[argument]
executable = "example_here.sh"
execution_path = "."
20 changes: 20 additions & 0 deletions tests/run_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,26 @@ fn test_git_download() -> Result<(), CommandError> {
Ok(())
}

#[test]
fn test_run_execution_path() -> Result<(), CommandError> {
let mut global_args = GlobalArguments::default();
let args = RunArguments::default();
//global_args.context = Some(StateContext::None);
let address_local = LocalAddressIn {
resolve_root: Some("examples/config".to_owned()),
state_path: Some("run_here".to_owned()),
..Default::default()
};
global_args.address = Some(AddressIn::Local(address_local));

let output = run_command(global_args, args)?;
assert!(output.exit.success());

assert_eq!("Also here!\n", output.out);

Ok(())
}

// #[test]
// fn test_archive() -> Result<(), CommandError> {
// let global_args = GlobalArguments::default();
Expand Down

0 comments on commit 35a28e9

Please sign in to comment.