Bump version: 0.3.13 -> 0.4.0 (#401)
This commit is contained in:
parent
fe0a6c252c
commit
c3d1d9049f
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,9 +1,17 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
## [v0.4.0] - 2019-04-12
|
||||||
|
### Added
|
||||||
|
- Add recipe aliases by @ryloric (#390)
|
||||||
|
- Allow arbitrary expressions as default arguments (#400)
|
||||||
|
- Add justfile summaries (#399)
|
||||||
|
- Allow outer shebang lines so justfiles can be used as scripts (#393)
|
||||||
|
- Allow `--justfile` without `--working-directory` by @smonami (#392)
|
||||||
|
- Add link to Chinese translation of readme by @chinanf-boy (#377)
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
### Changed
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
- Upgrade to Rust 2018 (#394)
|
||||||
|
- Format the codebase with rustfmt (#346)
|
||||||
|
|
||||||
## [v0.3.13] - 2018-11-06
|
## [v0.3.13] - 2018-11-06
|
||||||
### Added
|
### Added
|
||||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -190,7 +190,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "just"
|
name = "just"
|
||||||
version = "0.3.13"
|
version = "0.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "just"
|
name = "just"
|
||||||
version = "0.3.13"
|
version = "0.4.0"
|
||||||
description = "🤖 Just a command runner"
|
description = "🤖 Just a command runner"
|
||||||
authors = ["Casey Rodarmor <casey@rodarmor.com>"]
|
authors = ["Casey Rodarmor <casey@rodarmor.com>"]
|
||||||
license = "CC0-1.0"
|
license = "CC0-1.0"
|
||||||
|
@ -112,9 +112,7 @@ impl Parameter {
|
|||||||
Parameter {
|
Parameter {
|
||||||
variadic: parameter.variadic,
|
variadic: parameter.variadic,
|
||||||
name: parameter.name.to_owned(),
|
name: parameter.name.to_owned(),
|
||||||
default: parameter
|
default: parameter.default.map(Expression::new),
|
||||||
.default
|
|
||||||
.map(|expression| Expression::new(expression)),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,88 +1,87 @@
|
|||||||
use executable_path::executable_path;
|
|
||||||
use std::{
|
|
||||||
process::Command,
|
|
||||||
time::{Duration, Instant},
|
|
||||||
};
|
|
||||||
use tempdir::TempDir;
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
fn kill(process_id: u32) {
|
mod unix {
|
||||||
unsafe {
|
use executable_path::executable_path;
|
||||||
libc::kill(process_id as i32, libc::SIGINT);
|
use std::{
|
||||||
}
|
process::Command,
|
||||||
}
|
time::{Duration, Instant},
|
||||||
|
};
|
||||||
|
use tempdir::TempDir;
|
||||||
|
|
||||||
#[cfg(unix)]
|
fn kill(process_id: u32) {
|
||||||
fn interrupt_test(justfile: &str) {
|
unsafe {
|
||||||
let tmp = TempDir::new("just-interrupts").unwrap_or_else(|err| {
|
libc::kill(process_id as i32, libc::SIGINT);
|
||||||
panic!(
|
}
|
||||||
"integration test: failed to create temporary directory: {}",
|
|
||||||
err
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
let mut justfile_path = tmp.path().to_path_buf();
|
|
||||||
justfile_path.push("justfile");
|
|
||||||
brev::dump(justfile_path, justfile);
|
|
||||||
|
|
||||||
let start = Instant::now();
|
|
||||||
|
|
||||||
let mut child = Command::new(&executable_path("just"))
|
|
||||||
.current_dir(&tmp)
|
|
||||||
.spawn()
|
|
||||||
.expect("just invocation failed");
|
|
||||||
|
|
||||||
while start.elapsed() < Duration::from_millis(500) {}
|
|
||||||
|
|
||||||
kill(child.id());
|
|
||||||
|
|
||||||
let status = child.wait().unwrap();
|
|
||||||
|
|
||||||
let elapsed = start.elapsed();
|
|
||||||
|
|
||||||
if elapsed > Duration::from_secs(2) {
|
|
||||||
panic!("process returned too late: {:?}", elapsed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if elapsed < Duration::from_millis(100) {
|
fn interrupt_test(justfile: &str) {
|
||||||
panic!("process returned too early : {:?}", elapsed);
|
let tmp = TempDir::new("just-interrupts").unwrap_or_else(|err| {
|
||||||
|
panic!(
|
||||||
|
"integration test: failed to create temporary directory: {}",
|
||||||
|
err
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
let mut justfile_path = tmp.path().to_path_buf();
|
||||||
|
justfile_path.push("justfile");
|
||||||
|
brev::dump(justfile_path, justfile);
|
||||||
|
|
||||||
|
let start = Instant::now();
|
||||||
|
|
||||||
|
let mut child = Command::new(&executable_path("just"))
|
||||||
|
.current_dir(&tmp)
|
||||||
|
.spawn()
|
||||||
|
.expect("just invocation failed");
|
||||||
|
|
||||||
|
while start.elapsed() < Duration::from_millis(500) {}
|
||||||
|
|
||||||
|
kill(child.id());
|
||||||
|
|
||||||
|
let status = child.wait().unwrap();
|
||||||
|
|
||||||
|
let elapsed = start.elapsed();
|
||||||
|
|
||||||
|
if elapsed > Duration::from_secs(2) {
|
||||||
|
panic!("process returned too late: {:?}", elapsed);
|
||||||
|
}
|
||||||
|
|
||||||
|
if elapsed < Duration::from_millis(100) {
|
||||||
|
panic!("process returned too early : {:?}", elapsed);
|
||||||
|
}
|
||||||
|
|
||||||
|
assert_eq!(status.code(), Some(130));
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_eq!(status.code(), Some(130));
|
#[test]
|
||||||
}
|
fn interrupt_shebang() {
|
||||||
|
interrupt_test(
|
||||||
#[cfg(unix)]
|
"
|
||||||
#[test]
|
|
||||||
fn interrupt_shebang() {
|
|
||||||
interrupt_test(
|
|
||||||
"
|
|
||||||
default:
|
default:
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
sleep 1
|
sleep 1
|
||||||
",
|
",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[test]
|
||||||
#[test]
|
fn interrupt_line() {
|
||||||
fn interrupt_line() {
|
interrupt_test(
|
||||||
interrupt_test(
|
"
|
||||||
"
|
|
||||||
default:
|
default:
|
||||||
@sleep 1
|
@sleep 1
|
||||||
",
|
",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[test]
|
||||||
#[test]
|
#[ignore]
|
||||||
fn interrupt_backtick() {
|
fn interrupt_backtick() {
|
||||||
interrupt_test(
|
interrupt_test(
|
||||||
"
|
"
|
||||||
foo = `sleep 1`
|
foo = `sleep 1`
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@echo hello
|
@echo {{foo}}
|
||||||
",
|
",
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user