Skip to content
Snippets Groups Projects
Select Git revision
  • fc7731bc59fb3329cb498db67f981e13e695b89a
  • main default protected
  • release/1.1
  • encrypt_comments
  • mnemonic_dewif
  • authors_rules
  • 0.14
  • rtd
  • 1.2.1 protected
  • 1.2.0 protected
  • 1.1.1 protected
  • 1.1.0 protected
  • 1.0.0 protected
  • 1.0.0rc1 protected
  • 1.0.0rc0 protected
  • 1.0.0-rc protected
  • 0.62.0 protected
  • 0.61.0 protected
  • 0.60.1 protected
  • 0.58.1 protected
  • 0.60.0 protected
  • 0.58.0 protected
  • 0.57.0 protected
  • 0.56.0 protected
  • 0.55.1 protected
  • 0.55.0 protected
  • 0.54.3 protected
  • 0.54.2 protected
28 results

release.sh

Blame
  • release.sh 701 B
    #!/bin/bash
    
    #__version__     = '0.20.1dev9'
    current=`grep -P "__version__     = \'\d+.\d+.\d+(\w*)\'" duniterpy/__init__.py | grep -oP "\d+.\d+.\d+(\w*)"`
    echo "Current version: $current"
    
    if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+[0-9a-z]*$ ]]; then
      # update version in duniterpy
      sed -i "s/__version__     = '$current'/__version__     = '$1'/g" duniterpy/__init__.py
      # update version in documentation configuration
      sed -i "s/version = '$current'/version = '$1'/g" docs/conf.py
      sed -i "s/release = '$current'/release = '$1'/g" docs/conf.py
      # commit changes and add version tag
      git commit duniterpy/__init__.py docs/conf.py -m "$1"
      git tag "$1" -a -m "$1"
    else
      echo "Wrong version format"
    fi