Skip to content

Latest commit

 

History

History
142 lines (99 loc) · 3.33 KB

README.md

File metadata and controls

142 lines (99 loc) · 3.33 KB

rrclone

GitHub release (latest by date) GitHub contributors GitHub

rrclone is an Rclone wrapper to use YAML/JSON configuration for backup tasks.

TODO: Provide full README.

NOTE: This is a work-in-progress application with a very limited functionality. Expect breaking changes and improved functionality as we move on.

Installation

First, make sure that rclone is installed.

Then, download the latest version from releases for your architecture and put it in your path:

curl -sLo /tmp/rrclone "https://github.com/telostat/rrclone/releases/latest/download/rrclone-$(uname -s)-$(uname -m)"
sudo install /tmp/rrclone /usr/local/bin

Usage

  1. Configure rclone

  2. Prepare configuration file for rrclone.

  3. Run rrclone in dry-run mode:

    rrclone ./config.yaml --dry-run
  4. Run rrclone:

    rrclone ./config.yaml

Releasing

Enter Nix shell:

nix-shell

Install cross:

cargo install -f cross

First, merge develop to main:

git checkout main
git merge --no-ff develop

Update the version information in Cargo.toml if required and run cargo build to update Cargo.lock.

Set the release tag (example is 0.0.2):

export RELTAG="0.0.2"

Update the CHANGELOG.md by running:

git-chglog --output CHANGELOG.md --next-tag "${RELTAG}"

Commit changes:

git commit -am "chore(release): ${RELTAG}"

Tag:

git tag -a -m "Release ${RELTAG}" "${RELTAG}"

Push everything:

git push --follow-tags origin main

Create a new GitHub release:

gh release create "${RELTAG}" --generate-notes --title "v${RELTAG}" --draft

Build on your own architecture and upload to the release(hoping that it is Linux x86_64, otherwise must add this to cross build instructions, too):

cargo build --release
mv target/release/rrclone "target/release/rrclone-$(uname -s)-$(uname -m)"
gh release upload "${RELTAG}" --clobber "target/release/rrclone-$(uname -s)-$(uname -m)"

Build and upload other architectures:

cross build --target aarch64-unknown-linux-gnu --release
mv target/aarch64-unknown-linux-gnu/release/rrclone "target/aarch64-unknown-linux-gnu/release/rrclone-Linux-aarch64"
gh release upload "${RELTAG}" --clobber "target/aarch64-unknown-linux-gnu/release/rrclone-Linux-aarch64"

cross build --target arm-unknown-linux-gnueabihf --release
mv target/arm-unknown-linux-gnueabihf/release/rrclone "target/arm-unknown-linux-gnueabihf/release/rrclone-Linux-arm"
gh release upload "${RELTAG}" --clobber "target/arm-unknown-linux-gnueabihf/release/rrclone-Linux-arm"

cross build --target armv7-unknown-linux-gnueabihf --release
mv target/armv7-unknown-linux-gnueabihf/release/rrclone "target/armv7-unknown-linux-gnueabihf/release/rrclone-Linux-armv7"
gh release upload "${RELTAG}" --clobber "target/armv7-unknown-linux-gnueabihf/release/rrclone-Linux-armv7"

Switch to develop and rebase:

git checkout develop
git rebase main

Bump development version, run cargo build to update Cargo.lock, commit and git push.

License

See LICENSE file.