Skip to content

Commit

Permalink
update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mpwsh committed Sep 29, 2023
1 parent 4963bb2 commit a575f11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ name: Test, build and release binary
on:
push:
branches:
- '*'
- main
pull_request: null

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ const CHUNK_SIZE: usize = 1024 * 100;

fn main() -> Result<()> {
let args: Vec<String> = env::args().collect();
let tty = atty::is(atty::Stream::Stdin);
let tty = !atty::is(atty::Stream::Stdin);
if let Some(arg) = args.get(1) {
match tty {
//Decode + Decompress + Save to file
false => from_raw(arg)?,
true => from_raw(arg)?,
//Read from path + Compress + Encode
true => to_raw(arg)?,
false => to_raw(arg)?,
};
} else {
println!(
Expand Down

0 comments on commit a575f11

Please sign in to comment.