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
1 parent
bb026e3
commit fe31c46
Showing
2 changed files
with
62 additions
and
11 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
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 |
---|---|---|
@@ -1,13 +1,36 @@ | ||
|
||
temp = "temp" | ||
|
||
task :site do | ||
temp = "temp" | ||
puts `git clone -l -s -b gh-pages . ../#{temp}` | ||
clone | ||
if system("mvn site-deploy") | ||
puts `cd ../#{temp} && git add -A && git commit -m "deploying site" && git push origin gh-pages` | ||
puts `git push origin gh-pages` | ||
push "deploying site" | ||
puts " site deployed successfully " | ||
else | ||
puts " site deployment failed " | ||
end | ||
puts `rm -r ../#{temp}` | ||
clean | ||
end | ||
|
||
task :repo do | ||
clone | ||
if system("mvn release:perform") | ||
push "releasing artifacts" | ||
puts " artifact released successfully " | ||
else | ||
puts " could not release artifact " | ||
clean | ||
end | ||
|
||
def clone | ||
puts `git clone -l -s -b gh-pages . ../#{temp}` | ||
end | ||
|
||
def push(message) | ||
puts `cd ../#{temp} && git add -A && git commit -m "#{message}" && git push origin gh-pages` | ||
puts `git push origin gh-pages` | ||
end | ||
|
||
def clean | ||
puts `rm -r ../#{temp}` | ||
end |