manicmaniac/ApolloDeveloperKit

View on GitHub
bin/bump-version

Summary

Maintainability
Test Coverage
#!/bin/bash

set -e

if [ $# -ne 1 -o "$1" = '-h' -o "$1" = '--help' ]; then
    echo 'Usage: bump-version [-h|--help] <VERSION>' >&2
    exit 1
fi

agvtool new-version "${1%.*}"
agvtool new-marketing-version "$1"
sed -i '' -E "/spec[.]version *=/s/[0-9]+[.][0-9]+[.][0-9]+/$1/" ApolloDeveloperKit.podspec
sed -i '' -E "/pod 'ApolloDeveloperKit',/s/[0-9]+[.][0-9]+[.][0-9]+/$1/" README.md
npm version --no-git-tag-version "$1"