Skip to content

Commit

Permalink
Added taskfile and updated todofile
Browse files Browse the repository at this point in the history
  • Loading branch information
Hallison Batista authored and Hallison Batista committed Nov 9, 2010
1 parent 66dae1e commit cf683a6
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 9 deletions.
62 changes: 62 additions & 0 deletions taskfile
@@ -0,0 +1,62 @@
desc version "Load the current version for dump"
task version {
status "Loading version file"
load .version
version=(${tag//./ })
major=${version[0]}
minor=${version[1]}
patch=${version[2]}
build=${version[3]}
}

desc version:major "Dump major version"
task version:major {
status "Increment major version"
major=$(( major + 1 ))
tag="${major}.0.0"
version:dump
}

desc version:minor "Dump minor version"
task version:minor {
status "Increment minor version"
minor=$(( minor + 1 ))
tag="${major}.${minor}.0"
version:dump
}

desc version:patch "Dump patch version"
task version:patch {
status "Increment patch version"
patch=$(( patch + 1 ))
tag="${major}.${minor}.${patch}"
version:dump
}

desc version:build "Dump build version"
task version:build {
status "Increment build version"
build=$(( build + 1 ))
tag="${major}.${minor}.${patch}.${build}"
version:dump
}

task version:dump {
status "Dump new version"
echo "tag='${tag}'" > .version
echo "date='$(date +%Y-%m-%d)'" >> .version
echo "milestone='${milestone}'" >> .version
echo "timestamp='${timestamp}'" >> .version
echo "$(1<.version)"
}

desc news "Push a new release from master branch"
task news {
hosts="origin github fork codaset"

status "Releasing to hosts"
for remote in ${hosts}; do
run git push --tags master ${remote}
done
}

10 changes: 1 addition & 9 deletions todofile
Expand Up @@ -40,20 +40,12 @@ alias ron='ron -br5 --manual="Bash-Toolbox Manual" --organization="Bash-Toolbox"

= Push news to remote repositories

hosts=(github codaset)
hosts=(github fork codaset)

: Pushing news to ${hosts[@]}
for remote in ${hosts[@]}; do
+ git push ${remote} news
done

#= Push a new release from master branch
# @ tagged
# hosts=(git remote)
# : Releasing to ${hosts[@]}
# for remote in ${@}; do
# + git push --tags master ${remote}
# done

# vim: filetype=bash,toolbox

0 comments on commit cf683a6

Please sign in to comment.