From 71549ac7cdffeac004eaae920a0770cb5418c8a8 Mon Sep 17 00:00:00 2001 From: Luca Pizzamiglio Date: Fri, 1 Feb 2019 19:39:38 +0100 Subject: [PATCH] Fix template generation again --- CHANGELOG.md | 2 ++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/builder.rs | 5 ++++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9be649e..907af45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [0.1.1] 2019-02-01 ### Fixed - -b option wasn't honored diff --git a/Cargo.lock b/Cargo.lock index b5b23dc..d0dd511 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -366,7 +366,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "freebsd-ci" -version = "0.1.0" +version = "0.1.1" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "derive_is_enum_variant 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 05f57a1..da8f71f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Luca Pizzamiglio "] edition = "2018" name = "freebsd-ci" -version = "0.1.0" +version = "0.1.1" [dependencies] chrono = "0.4.6" derive_is_enum_variant = "0.1" diff --git a/src/builder.rs b/src/builder.rs index 6dc128a..a658040 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -82,7 +82,10 @@ fn generate_build_script( context.insert("delete_asset", &false); context.insert("asset_id", &0); } - let script = match tera.render(opt.build_template.to_str().unwrap(), &context) { + let script = match tera.render( + opt.build_template.file_name().unwrap().to_str().unwrap(), + &context, + ) { Ok(s) => s, Err(e) => { return Err(Error::from(BuildError::TeraTemplateRenderingErr {