Giter Site home page Giter Site logo

rslease's Introduction

rslease 2.0.1
Opinionated automated release actions for Rust projects.

USAGE:
    rslease.exe [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -i, --install    Install the new version locally.
    -M, --major      Release is a new major version (X.y.z). Default: new minor version.
    -n, --no-push    Do not perform a final push to the remote.
    -p, --patch      Release is a patch (x.y.Z). Default: new minor version.
    -V, --version    Prints version information

OPTIONS:
    -f, --for <base>         Use this version as the base (X or X.Y). Default: latest.
    -b, --branch <commit>    Start from this branch or commit. Default: no checkout.
    -r, --repo <path>        Path to the git repository to use. Default: current directory.

This program performs the following actions:
+ In --repo, by default the current directory.
+ If --branch is specified, checkout the commit.
+ Check if repo is clean and up to date: `git status`, `git rev-list`.
+ Retrieve the latest semver tag from git, possibly coerced by --for.
+ Increase the semver. Defaults to minor, use --patch or --major as needed.
+ Edit Cargo.toml, replacing `version`.
+ Run the cargo commands: `update`, `clippy -D warnings`, `fmt`.
+ Commit and create a new semver tag for the version.
+ If --install, run `cargo install`.
+ If a semver tag for the next minor does not already exist:
++ Edit Cargo.toml, replacing `version` with the next minor with '-dev' prerelease.
++ Run `cargo update` again.
++ Commit.
+ Unless --no-push, push the new HEAD, then push the new tag.

WARNING: Cargo.toml is naively edited using regexps. Most importantly, the first
occurrence of `^version = ..$` must belong to [package]. See the v1 for safe parsing,
which sadly came with too many caveats.

rslease's People

Contributors

geogi avatar

rslease's Issues

Smarter patches

Right now pushing a patch reverts the -dev prefix, which is bad (see wiki). This was made because of possible interactions with --for (i.e. pushing a v1.0.1 when v1.1 exists should not create a v1.1-dev) but even beyond that some thinking may be necessary.

Should patch releases go to a different branch ? We probably don't want to see the manifest in master do this :

  • v1.1 is released: v1.2.0-dev
  • v1.1.1 is released: rollback manifest with v1.1.1, then v1.2.0-dev
  • etc.

Pre-pull

During rslease own dev, I mistakenly forgot to pull before running it, but I had modified the README directly from GitHub. I had used no-push so no harm was done but it would be better if rslease tried to pull before any other action.

Because it won't work in some instances, e.g. on a detached HEAD when starting from a tag (which might not be the best idea but still), maybe add a switch like no-pre-pull.

Automated binary artifacts in release assets

Currently, rslease must be installed with cargo install, which is perfectly fine since it’s a
Rust-centric development tool. Still, it is a standalone executable that could be automatically
built using GitHub Actions and distributed as an asset in each GitHub Release. This would be a
fine training for using Actions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.