Skip to content

Commit

Permalink
Print version
Browse files Browse the repository at this point in the history
  • Loading branch information
max-lt committed Mar 6, 2024
1 parent 41df2df commit 75f64fc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,8 @@ jobs:
asset_name: github-hook
asset_content_type: application/octet-stream

# Publish tag release
- uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}

# Publish latest release
- uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: latest
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "github-hook-rs"
version = "0.1.1"
version = "0.1.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ async fn github_hook(

#[actix_web::main]
async fn main() -> std::io::Result<()> {
if std::env::args().any(|a| a == "--version") {
println!("v{}", VERSION);
return Ok(());
}

if !std::env::var("RUST_LOG").is_ok() {
std::env::set_var("RUST_LOG", "github_hook_rs=debug");
}
Expand Down

0 comments on commit 75f64fc

Please sign in to comment.