Git Product home page Git Product logo

autoversion's Introduction

Autoversion

Cross-language tool written in Python to automatically version projects using SemVer

CircleCI

PyPI version

Getting started

  1. install auto_version
pipenv install pyautoversion
  1. run auto_version --config=desired/config/path
    • desired/config/path: path to a configuration file in toml format. If the file does not exist, it will be created with defaults.
  2. adjust the configuration as necessary. in particular, set targets to a list of files in your project that contain variables for the tool to update.
    • fields under key_aliases map from your project to auto_version; values on the left are the variable names exactly as they appear in your project files.
  3. run auto_version --config=desired/config/path to have the tool print out the currently detected version. You may need to readjust the config.
  4. run auto_version --config=desired/config/path --bump=patch -vv to try an initial version increment, and view details on the updates the tool has applied. Check your target files, and if they are as you'd expect then you're good to go.

Usage

For more details about how to use the tool, have a look at the usage page

usage: auto_version [-h] [--target TARGET] [--bump {major,minor,patch}]
                    [--news] [--set SET] [--set-patch-count] [--lock]
                    [--release] [--version] [--config CONFIG] [-v]

auto version: a tool to control version numbers

optional arguments:
  -h, --help            show this help message and exit
  --target TARGET       Files containing version info. Assumes unique variable
                        names between files. (default: ['src\\_version.py']).
  --bump {major,minor,patch}
                        Bumps the specified part of SemVer string. Use this
                        locally to correctly modify the version file.
  --news, --file-triggers
                        Detects need to bump based on presence of files (as
                        specified in config).
  --set SET             Set the SemVer string. Use this locally to set the
                        project version explicitly.
  --set-patch-count     Sets the patch number to the commit count.
  --lock                Locks the SemVer string. Lock will remain for another
                        call to autoversion before being cleared.
  --release             Marks as a release build, which flags the build as
                        released.
  --version             Prints the version of auto_version itself (self-
                        version).
  --config CONFIG       Configuration file path.
  -v, --verbosity       increase output verbosity. can be specified multiple
                        times

autoversion's People

Contributors

acabarbaye avatar alexl0gan avatar davidhyman avatar monty-bot avatar

Watchers

James Cloos avatar

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.