Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hallison Batista
authored and
Hallison Batista
committed
Nov 9, 2010
1 parent
66dae1e
commit cf683a6
Showing
2 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters