-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from blacknon/develop
Update Version 0.6.5 - go-prompt version up to 0.2.6 - Changed the key input mechanism of the parallel shell.
- Loading branch information
Showing
31 changed files
with
341 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
# Copyright (c) 2021 Blacknon. All rights reserved. | ||
# Use of this source code is governed by an MIT license | ||
# that can be found in the LICENSE file. | ||
# reference: | ||
# - https://motemen.hatenablog.com/entry/2019/11/github-actions-crossbuild-rust | ||
# - https://github.com/motemen/lssh/blob/97d3745dcc8931a1d75217573d5ca60705be632f/.github/workflows/release.yml | ||
# - https://github.com/greymd/teip/blob/master/.github/workflows/release.yml | ||
|
||
|
||
name: Release Job. | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
# build rust binary | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- goos: linux | ||
goarch: amd64 | ||
os: ubuntu-latest | ||
ext: tar.gz | ||
- goos: linux | ||
goarch: amd64 | ||
os: ubuntu-latest | ||
ext: rpm | ||
- goos: linux | ||
goarch: amd64 | ||
os: ubuntu-latest | ||
ext: deb | ||
- goos: darwin | ||
goarch: amd64 | ||
os: macos-latest | ||
ext: tar.gz | ||
# - goos: windows | ||
# goarch: amd64 | ||
# os: windows-latest | ||
# ext: zip | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Set up Go 1.17 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Get version | ||
id: package_version | ||
shell: bash | ||
run: | | ||
VERSION="$(go run ./cmd/lssh/ --version | awk '{print $NF}')" | ||
echo "::set-output name=version::$VERSION" | ||
- name: Build binary | ||
run: | | ||
go build -o lssh.${{ matrix.goos }}_${{ matrix.goarch }} ./cmd/lssh | ||
go build -o lscp.${{ matrix.goos }}_${{ matrix.goarch }} ./cmd/lscp | ||
go build -o lsftp.${{ matrix.goos }}_${{ matrix.goarch }} ./cmd/lsftp | ||
- name: Create package file | ||
if: ${{ (matrix.ext == 'tar.gz') || (matrix.ext == 'rpm') || (matrix.ext == 'deb') }} | ||
run: | | ||
_TAR=lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz | ||
mkdir -p package/bin | ||
mv lssh.${{ matrix.goos }}_${{ matrix.goarch }} package/bin/lssh | ||
mv lscp.${{ matrix.goos }}_${{ matrix.goarch }} package/bin/lscp | ||
mv lsftp.${{ matrix.goos }}_${{ matrix.goarch }} package/bin/lsftp | ||
## mkdir -p package/man | ||
## cp man/lssh.1 package/man | ||
cp -r completion package/ | ||
## sed -i is not used due to difference between macOS and Linux | ||
perl -i -pe s/___VERSION___/${{ steps.package_version.outputs.version }}/ ./package/.tar2package.yml | ||
## tar czvf "$_TAR" -C "$PWD/package" completion bin man .tar2package.yml | ||
tar czvf "$_TAR" -C "$PWD/package" completion bin .tar2package.yml | ||
# use: https://github.com/greymd/tar2package | ||
- name: Build rpm | ||
id: rpm | ||
if: matrix.ext == 'rpm' | ||
run: | | ||
_TAR=lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz | ||
docker run -i "greymd/tar2rpm:1.0.1" < "$_TAR" > lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.rpm | ||
echo ::set-output name=sha256::$( sha256sum lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.rpm | awk '{print $1}' ) | ||
# use: https://github.com/greymd/tar2package | ||
- name: Build deb | ||
id: deb | ||
if: matrix.ext == 'deb' | ||
run: | | ||
_TAR=lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz | ||
docker run -i "greymd/tar2deb:1.0.1" < "$_TAR" > lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.deb | ||
echo ::set-output name=sha256::$( sha256sum lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.deb | awk '{print $1}' ) | ||
- name: README for rpm | ||
if: matrix.ext == 'rpm' | ||
run: | | ||
_TAR=lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.rpm | ||
- name: Upload artifact | ||
if: matrix.ext == 'rpm' | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: build-${{ matrix.goos }}_${{ matrix.goarch }} | ||
path: lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.rpm | ||
|
||
- name: README for deb | ||
if: matrix.ext == 'deb' | ||
run: | | ||
_TAR=lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.deb | ||
- name: Upload artifact | ||
if: matrix.ext == 'deb' | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: build-${{ matrix.goos }}_${{ matrix.goarch }} | ||
path: lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.deb | ||
|
||
- name: Upload artifact | ||
if: matrix.ext == 'tar.gz' | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: build-${{ matrix.goos }}_${{ matrix.goarch }} | ||
path: lssh_${{ steps.package_version.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz | ||
|
||
# create package release | ||
create-release: | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.package_version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Get version | ||
id: package_version | ||
shell: bash | ||
run: | | ||
VERSION="$(go run ./cmd/lssh/ --version | awk '{print $NF}')" | ||
echo "::set-output name=version::$VERSION" | ||
- id: create-release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ steps.package_version.outputs.version }} | ||
release_name: Version ${{ steps.package_version.outputs.version }} | ||
draft: true | ||
prerelease: false | ||
|
||
- run: | | ||
echo '${{ steps.create-release.outputs.upload_url }}' > release_upload_url.txt | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: create-release | ||
path: release_upload_url.txt | ||
|
||
upload-release: | ||
strategy: | ||
matrix: | ||
include: | ||
- goos: linux | ||
goarch: amd64 | ||
os: ubuntu-latest | ||
ext: tar.gz | ||
- goos: linux | ||
goarch: amd64 | ||
os: ubuntu-latest | ||
ext: rpm | ||
- goos: linux | ||
goarch: amd64 | ||
os: ubuntu-latest | ||
ext: deb | ||
- goos: darwin | ||
goarch: amd64 | ||
os: macos-latest | ||
ext: tar.gz | ||
needs: [create-release] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: create-release | ||
|
||
- id: upload-url | ||
run: | | ||
echo "::set-output name=url::$(cat create-release/release_upload_url.txt)" | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: build-${{ matrix.goos }}_${{ matrix.goarch }} | ||
|
||
- uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.upload-url.outputs.url }} | ||
asset_path: ./build-${{ matrix.goos }}_${{ matrix.goarch }}/lssh_${{ needs.create-release.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.${{ matrix.ext }} | ||
asset_name: lssh_${{ needs.create-release.outputs.version }}_${{ matrix.goos }}_${{ matrix.goarch }}.${{ matrix.ext }} | ||
asset_content_type: application/octet-stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,15 @@ TUI list select ssh/scp/sftp client tools. | |
|
||
## Description | ||
|
||
command to read a prepared list in advance and connect ssh/scp/sftp the selected host. List file is set in yaml format. When selecting a host, you can filter by keywords. Can execute commands concurrently to multiple hosts. Supported multiple ssh proxy, http/socks5 proxy, x11 forward, and port forwarding. | ||
This command utility to read a prepared list in advance and connect ssh/scp/sftp the selected host. | ||
List file is set in yaml format. | ||
When selecting a host, you can filter by keywords. | ||
Can execute commands concurrently to multiple hosts. | ||
|
||
lssh also has a shell (parallel shell) that connects to multiple hosts at the same time and pipes the execution results of local commands and remote hosts. | ||
In addition, lsftp also has a shell that can be connected in parallel. | ||
|
||
Supported multiple ssh proxy, http/socks5 proxy, x11 forward, and port forwarding. | ||
|
||
## Features | ||
|
||
|
@@ -102,7 +110,7 @@ option(lssh) | |
blacknon([email protected]) | ||
|
||
VERSION: | ||
0.6.4 | ||
0.6.5 | ||
|
||
USAGE: | ||
# connect ssh | ||
|
@@ -143,7 +151,7 @@ option(lscp) | |
blacknon([email protected]) | ||
|
||
VERSION: | ||
0.6.4 | ||
0.6.5 | ||
|
||
USAGE: | ||
# local to remote scp | ||
|
@@ -178,7 +186,7 @@ option(lsftp) | |
blacknon([email protected]) | ||
|
||
VERSION: | ||
0.6.4 | ||
0.6.5 | ||
|
||
USAGE: | ||
# start lsftp shell | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ USAGE: | |
app.Name = "lscp" | ||
app.Usage = "TUI list select and parallel scp client command." | ||
app.Copyright = "blacknon([email protected])" | ||
app.Version = "0.6.4" | ||
app.Version = "0.6.5" | ||
|
||
// options | ||
// TODO(blacknon): オプションの追加(0.7.0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ USAGE: | |
app.Name = "lsftp" | ||
app.Usage = "TUI list select and parallel sftp client command." | ||
app.Copyright = "blacknon([email protected])" | ||
app.Version = "0.6.4" | ||
app.Version = "0.6.5" | ||
|
||
app.Flags = []cli.Flag{ | ||
cli.StringFlag{Name: "file,F", Value: defConf, Usage: "config file path"}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ USAGE: | |
app.Name = "lssh" | ||
app.Usage = "TUI list select and parallel ssh client command." | ||
app.Copyright = "blacknon([email protected])" | ||
app.Version = "0.6.4" | ||
app.Version = "0.6.5" | ||
|
||
// TODO(blacknon): オプションの追加 | ||
// -f ... バックグラウンドでの接続(X11接続やport forwardingをバックグラウンドで実行する場合など)。 | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.