Skip to content

Commit

Permalink
use platform specific file ending
Browse files Browse the repository at this point in the history
  • Loading branch information
amritanshu-pandey committed Sep 22, 2022
1 parent 7eef8f3 commit 91cdd77
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,4 @@ jobs:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./target/release/${{ matrix.asset_name }}
asset_name: ${{ matrix.asset_name }}
asset_content_type: application/tar+gzip
- name: upload example config file
id: upload-release-assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./example/fakejson.yaml
asset_name: config.yaml
asset_content_type: application/text
asset_content_type: application/tar+gzip
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fakelogs"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
9 changes: 7 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ mod config;
mod generators;
mod log_generator;

#[cfg(windows)]
const LINE_ENDING : &'static str = "\r\n";
#[cfg(not(windows))]
const LINE_ENDING : &'static str = "\n";

fn main() {
let list_of_names: Vec<&str> = include_str!("./dataset/data/names_sampled.txt")
.split("\n")
.split(LINE_ENDING)
.collect::<Vec<_>>();
let list_of_words: Vec<&str> = include_str!("./dataset/data/words_sampled.txt")
.split("\n")
.split(LINE_ENDING)
.collect::<Vec<_>>();

let args = cli::get_cli_args();
Expand Down

0 comments on commit 91cdd77

Please sign in to comment.