Skip to content

Commit

Permalink
feat(main): always append to file
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
cburgdorf committed Sep 17, 2014
1 parent dfd420f commit b880ba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Expand Up @@ -14,7 +14,7 @@ extern crate time;
use git::{ LogReaderConfig, get_commits, get_latest_tag };
use log_writer::{ LogWriter, LogWriterOptions };
use section_builder::build_sections;
use std::io::{File, Open, Write};
use std::io::{File, Append, Write};
use docopt::FlagParser;

mod common;
Expand Down Expand Up @@ -52,7 +52,7 @@ fn main () {
let commits = get_commits(log_reader_config);

let sections = build_sections(commits.clone());
let mut file = File::open_mode(&Path::new("changelog.md"), Open, Write).ok().unwrap();
let mut file = File::open_mode(&Path::new("changelog.md"), Append, Write).ok().unwrap();
let mut writer = LogWriter::new(&mut file, LogWriterOptions {
repository_link: args.flag_repository,
version: args.flag_setversion,
Expand Down

0 comments on commit b880ba1

Please sign in to comment.