Skip to content

Commit

Permalink
Merge pull request #1297 from habitat-sh/trim-version
Browse files Browse the repository at this point in the history
Fix bug with inclusion of whitespace in VERSION constant
  • Loading branch information
bookshelfdave authored Sep 28, 2016
2 parents f0fc1bc + 970edd0 commit 799748c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() {
_ => read_version(),
};
let mut f = File::create(Path::new(&env::var("OUT_DIR").unwrap()).join("VERSION")).unwrap();
f.write_all(version.as_bytes()).unwrap();
f.write_all(version.trim().as_bytes()).unwrap();
}

fn read_version() -> String {
Expand Down
2 changes: 1 addition & 1 deletion components/builder-admin/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ fn write_version_file() {
_ => read_version(),
};
let mut f = File::create(Path::new(&env::var("OUT_DIR").unwrap()).join("VERSION")).unwrap();
f.write_all(version.as_bytes()).unwrap();
f.write_all(version.trim().as_bytes()).unwrap();
}
2 changes: 1 addition & 1 deletion components/builder-api/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ fn write_version_file() {
_ => read_version(),
};
let mut f = File::create(Path::new(&env::var("OUT_DIR").unwrap()).join("VERSION")).unwrap();
f.write_all(version.as_bytes()).unwrap();
f.write_all(version.trim().as_bytes()).unwrap();
}
2 changes: 1 addition & 1 deletion components/builder-depot/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ fn write_version_file() {
_ => read_version(),
};
let mut f = File::create(Path::new(&env::var("OUT_DIR").unwrap()).join("VERSION")).unwrap();
f.write_all(version.as_bytes()).unwrap();
f.write_all(version.trim().as_bytes()).unwrap();
}

0 comments on commit 799748c

Please sign in to comment.