From ebc7fd2b0e31dbb26f59b422779463b94d6f46f0 Mon Sep 17 00:00:00 2001 From: Alexandr Bogomyakov Date: Tue, 20 Jun 2023 02:56:44 +0300 Subject: [PATCH] 1.0.0 --- .github/workflows/build.yml | 38 ----------------------------------- .github/workflows/release.yml | 1 + CHANGELOG.md | 14 +++++++++++++ Cargo.toml | 2 +- src/main.rs | 12 +++++++---- 5 files changed, 24 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 CHANGELOG.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 56d9bae..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Rust-static-build-musl -#on: -# push: -# branches: [ master ] -# pull_request: -# branches: [ master ] -on: - push: - tags: - - '*' -env: - CARGO_TERM_COLOR: always - BUILD_TARGET: x86_64-unknown-linux-musl - BINARY_NAME: rexec -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v3 - - name: Build-musl - uses: gmiam/rust-musl-action@master - with: - args: cargo build --target $BUILD_TARGET --release - release: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/upload-artifact@v2 - name: Upload artifact - with: - name: ${{ env.BINARY_NAME }} - path: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }}* - - uses: ncipollo/release-action@v1 - with: - artifacts: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }}* \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86322a0..eddf637 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,5 +27,6 @@ jobs: uses: Roang-zero1/github-upload-release-artifacts-action@v2 with: args: "rexec" + bodyFile: CHANGES.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..9f54430 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.0.0] - 2023-06-20 + +### Changed + +- Host string expanshion. +- `~/.ssh/known_hosts` as source of server lists works. +- Made Github Actions to do release. diff --git a/Cargo.toml b/Cargo.toml index d8efcaa..62c1bfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rexec" -version = "0.1.0" +version = "1.0.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index fb09fa4..74d9910 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,8 +6,8 @@ use env_logger::Env; use itertools::Itertools; use log::{error, info}; use massh::{MasshClient, MasshConfig, MasshHostConfig, SshAuth}; -use regex::{Regex}; -use std::collections::{HashMap}; +use regex::Regex; +use std::collections::HashMap; use std::fs::read_to_string; use std::hash::Hash; use std::net::IpAddr; @@ -178,13 +178,17 @@ fn main() { "{}", hosts_and_ips .get(&ip) - .unwrap_or(&"Couldn't parse IP".to_string()).to_string().yellow().bold().to_string() + .unwrap_or(&"Couldn't parse IP".to_string()) + .to_string() + .yellow() + .bold() + .to_string() ); let output = match result { Ok(output) => output, Err(e) => { error!("Can't access server: {}", e); - continue + continue; } }; if output.exit_status == 0 {