Skip to content
Snippets Groups Projects
Select Git revision
  • 15dc2c72293a6642ed202289f9213d670b39c2b1
  • main default
  • penenadpi/config-man
  • penenadpi/visualization-extension
  • penenadpi/visulization-html-extended
  • penenadpi/result-persistence
  • penenadpi/result-filter-fix-files
  • penenadpi/result-filter-fix
  • y1
  • 0.1.9
  • 0.1.8
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
  • 0.0.9
  • 0.0.8
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
28 results

results_summary.py

Blame
  • bumpversion.sh 1.13 KiB
    #!/usr/bin/env bash
    
    function log_info() {
      >&2 echo -e "[\\e[1;94mINFO\\e[0m] $*"
    }
    
    function log_warn() {
      >&2 echo -e "[\\e[1;93mWARN\\e[0m] $*"
    }
    
    function log_error() {
      >&2 echo -e "[\\e[1;91mERROR\\e[0m] $*"
    }
    
    # check number of arguments
    if [[ "$#" -le 2 ]]; then
      log_error "Missing arguments"
      log_error "Usage: $0 <current version> <next version>"
      exit 1
    fi
    
    curVer=$1
    nextVer=$2
    relType=$3
    
    if [[ "$curVer" ]]; then
      log_info "Bump version from \\e[33;1m${curVer}\\e[0m to \\e[33;1m${nextVer}\\e[0m (release type: $relType)..."
    
      # replace in README
      sed -e "s/ref: *'$curVer'/ref: '$nextVer'/" -e "s/ref: *\"$curVer\"/ref: \"$nextVer\"/" -e "s/component: *\(.*\)@$curVer/component: \1@$nextVer/" README.md > README.md.next
      mv -f README.md.next README.md
    
      # replace in template and variants
      for tmpl in templates/*.yml
      do
        sed -e "s/command: *\[ *\"--service\", *\"\(.*\)\", *\"$curVer\" *\]/command: [\"--service\", \"\1\", \"$nextVer\"]/" "$tmpl" > "$tmpl.next"
        mv -f "$tmpl.next" "$tmpl"
      done
    else
      log_info "Bump version to \\e[33;1m${nextVer}\\e[0m (release type: $relType): this is the first release (skip)..."
    fi