Skip to content

Commit a5ec80e

Browse files
committed
Merge branch 'unstable' into stable
2 parents 0643ba7 + a75ca49 commit a5ec80e

File tree

16 files changed

+89
-26
lines changed

16 files changed

+89
-26
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ All notable changes to this project will be documented in this file.
77
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99

10+
## [1.4.1] - 2025-03-05
11+
12+
### Changed
13+
14+
- Added support of `daemon_wait_seconds` field in `CustomCommand`.
15+
1016
## [1.4.0-beta-7] - 2025-02-20
1117

1218
### Changed
@@ -459,6 +465,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
459465
- Build support.
460466
- TUI.
461467

468+
[1.4.1]: https://github.com/impulse-sw/deployer/compare/1.4.0-beta-7...1.4.1
462469
[1.4.0-beta-7]: https://github.com/impulse-sw/deployer/compare/1.4.0-beta-6...1.4.0-beta-7
463470
[1.4.0-beta-6]: https://github.com/impulse-sw/deployer/compare/1.4.0-beta-5...1.4.0-beta-6
464471
[1.4.0-beta-5]: https://github.com/impulse-sw/deployer/compare/1.4.0-beta-4...1.4.0-beta-5

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "deployer"
3-
version = "1.4.0-beta-7"
3+
version = "1.4.1"
44
edition = "2024"
55

66
[dependencies]

DOCS.en.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ The command description for Deployer is as follows:
125125
"show_success_output": false,
126126
"show_bash_c": false,
127127
"only_when_fresh": false,
128-
"remote_exec": []
128+
"remote_exec": [],
129+
"daemon": false,
130+
"daemon_wait_seconds": null
129131
}
130132
```
131133

@@ -136,6 +138,8 @@ The command description for Deployer is as follows:
136138
- `show_bash_c` tells the Deployer whether to print the full command text on the screen; this can be useful when the command contains vulnerable variables
137139
- `only_when_fresh` tells Deployer that this action should only be performed on a fresh build (either on the first build, or when explicitly instructed to rebuild from scratch with the `-f` option)
138140
- `remote_exec` contains a list of short hostnames on which this command will need to be executed
141+
- `daemon` tells Deployer whether to run this command as a daemon process or not
142+
- `daemon_wait_seconds` tells Deployer how many seconds to wait for the daemon process to start before moving to the next command
139143

140144
When a command is specialized for a particular project, it gains an additional property - `replacements`:
141145

DOCS.ru.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@
125125
"show_success_output": false,
126126
"show_bash_c": false,
127127
"only_when_fresh": false,
128-
"remote_exec": []
128+
"remote_exec": [],
129+
"daemon": false,
130+
"daemon_wait_seconds": null
129131
}
130132
```
131133

@@ -136,6 +138,8 @@
136138
- `show_bash_c` говорит Деплойеру, нужно ли печатать на экране полный текст команды; это может быть полезным, когда команда содержит уязвимые переменные
137139
- `only_when_fresh` говорит Деплойеру, что это действие нужно выполнять только при свежей сборке (либо при первой сборке, либо при явном указании пересобрать с нуля при помощи опции `-f`)
138140
- `remote_exec` содержит список коротких имён хостов, на которых необходимо будет выполнить эту команду
141+
- `daemon` говорит Деплойеру, нужно ли запускать команду в фоновом режиме
142+
- `daemon_wait_seconds` содержит время ожидания в секундах перед запуском следующей команды
139143

140144
Когда команда специализируется для конкретного проекта, она обрастает дополнительным свойством - `replacements`:
141145

@@ -708,7 +712,7 @@ deployer new content
708712

709713
> [!NOTE]
710714
> При сборке в контейнерах Деплойер не поддерживает Действия `interrupt`, `observe`, `add_to_storage` и `use_from_storage`, а при запуске - Действия `add_to_storage` и `use_from_storage`.
711-
>
715+
>
712716
> Для решения проблем синхронизации каких-то файлов или выполнения операций ввода-вывода вы можете использовать Пайплайн с опциями контейнеризированной сборки внутри другого Пайплайна, который уже сможет использовать нужные вам Действия.
713717
714718
Посмотрим на пример контейнеризированного Пайплайна:

TODO.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
- [ ] make `Transfer` Actions to sync only selected files to and from remote
44
- [ ] make `deployer share content` command
55

6-
## Road to stable v1.4.0
6+
## Road to v1.4.2
77

8-
- [x] make `deployer run --containered` option for builds inside the container (ignore `Observe` and other Actions)
9-
- [x] translate and colorize containered run output
10-
- [x] add documentation for automated Dockerfile generation
118
- [ ] add variables and secrets forwarding to containered builds

src/actions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ pub fn edit_action(globals: &mut DeployerGlobalConfig, args: &CatActionArgs) ->
341341
Some(action) => action,
342342
};
343343

344-
described_action.edit_action_from_prompt()?;
344+
described_action.edit_action_from_prompt(None)?;
345345

346346
Ok(())
347347
}

src/actions/test.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ impl Execute for TestAction {
9797
}
9898
}
9999

100+
if self.success_when_found.is_none() && self.success_when_not_found.is_none() {
101+
output = command_out;
102+
}
103+
100104
Ok((true, output))
101105
}
102106
}

src/configs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ impl Default for DeployerGlobalConfig {
175175
only_when_fresh: None,
176176
remote_exec: None,
177177
daemon: None,
178+
daemon_wait_seconds: None,
178179
}],
179180
}),
180181
requirements: Some(vec![Requirement::Exists {

src/configs/migrate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ fn migrate_custom_v3_to_v4(prev_cmd: &CustomCommandV3) -> CustomCommand {
3232
only_when_fresh: prev_cmd.only_when_fresh,
3333
remote_exec: prev_cmd.remote_exec.clone(),
3434
daemon: None,
35+
daemon_wait_seconds: None,
3536
replacements: if let Some(prev_repls) = &prev_cmd.replacements {
3637
let mut repl_grps = vec![];
3738
for i1 in prev_repls {

src/containered.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pub fn run_simple(env: &RunEnvironment, bash_c: String) -> anyhow::Result<()> {
5858
show_bash_c: true,
5959
show_success_output: true,
6060
daemon: None,
61+
daemon_wait_seconds: None,
6162
})
6263
.execute(&RunEnvironment {
6364
no_pipe: true,

0 commit comments

Comments
 (0)