Skip to content

Commit

Permalink
gh-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
laktak committed Jan 14, 2024
1 parent 2d9a81b commit 5461c67
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 9 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

name: build

on: [push]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: prep
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install pyinstaller==6.3.0
rm -rf build dist
- name: build
shell: bash
run: |
echo "RUNNER_OS: $RUNNER_OS"
pyinstaller rsyncy.py --onefile --name rsyncy --console
cat build/rsyncy/warn-rsyncy.txt
cd dist; ls -l
if [ "$RUNNER_OS" == "Linux" ]; then
tar -czf rsyncy-linux_amd64.tar.gz rsyncy
elif [ "$RUNNER_OS" == "macOS" ]; then
tar -czf rsyncy-macos_amd64.tar.gz rsyncy
else
echo 'unknown runner'
exit 1
fi
- name: artifact
uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: binary-${{ matrix.os }}
path: dist/rsyncy*.tar.gz

- name: artifact
uses: actions/upload-artifact@v4
if: runner.os == 'macOS'
with:
name: binary-${{ matrix.os }}
path: dist/rsyncy*.tar.gz


publish:
runs-on: ubuntu-latest
needs: build
if: ${{ startsWith(github.ref, 'refs/tags/v') }}

steps:
- name: get-artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: list
shell: bash
run: |
find
ls -l dist
- name: publish-release
uses: softprops/action-gh-release@v1
with:
draft: true
files: dist/*

8 changes: 5 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

name: Lint
name: lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: psf/black@stable
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ dist/
*.egg-info/
*.pyc
_*
build
rsyncy.spec
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ Workaround: connect once to your server via ssh to add it to the known_hosts fil

## Installation

```
pip3 install --user rsyncy
Download: You can download a release directly from [github releases](https://github.com/laktak/rsyncy/releases).

# or if you have pipx
pipx install rsyncy
```
If you OS/platform is not yet supported you can also use either [pipx](https://pipx.pypa.io/latest/installation/) or pip:

Minimum Python version is 3.6.
- `pipx install rsyncy`
- `pip install --user rsyncy`

On macOS you also need to `brew install rsync` because it ships with an rsync from 2006.

Expand All @@ -65,7 +63,9 @@ $ rsync -a --info=progress2 -hv FROM/ TO | rsyncy

At the moment `rsyncy` itself has only one option, you can turn off colors via the `NO_COLOR=1` environment variable.

## Known Issues when using ssh behind rsync

ssh uses direct TTY access to make sure that the password is indeed issued by an interactive keyboard user. rsyncy is unable to detect the password prompt and will overwrite it with the status line. You can still enter your password and press enter to continue.

## lf support

Expand All @@ -87,6 +87,8 @@ cmd paste-rsync %{{

This shows the copy progress in the `>` line while rsync is running.

If you have downloaded the binary version you can create it with `ln -s rsyncy rsyncy-stat`.

## Development

First record an rsync transfer with [pipevcr](https://github.com/laktak/pipevcr), then replay it to rsyncy when debugging.

0 comments on commit 5461c67

Please sign in to comment.