release.sh
d5a9eaee
 #! /bin/sh
eaa65bf9
 
 TAG="${1:-`./mulle-bootstrap version`}"
 
 . mulle-bootstrap-functions.sh
 
 
 git_must_be_clean()
 {
    local name
    local clean
 
    name="${1:-${PWD}}"
 
    if [ ! -d .git ]
    then
378c259b
       fail "\"${name}\" is not a git repository"
eaa65bf9
    fi
 
ae34f9ba
    clean=`git status -s --untracked-files=no`
eaa65bf9
    if [ "${clean}" != "" ]
    then
378c259b
       fail "repository \"${name}\" is tainted"
eaa65bf9
    fi
 }
 
 
 set -e
 
 git_must_be_clean
dcc33b33
 git push public master
 
 # seperate step, as it's tedious to remove tag when
 # previous push fails
eaa65bf9
 
 git tag "${TAG}"
 git push public master --tags
dcc33b33
 
eaa65bf9
 ./generate-brew-formula.sh  > ../homebrew-software/mulle-bootstrap.rb
 (
 	cd ../homebrew-software ; \
  	git commit -m "${TAG} release of mulle-bootstrap" mulle-bootstrap.rb ; \
  	git push origin master
 )