Skip to content

Commit

Permalink
updating rake tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
ananthakumaran committed Apr 3, 2010
1 parent bb026e3 commit fe31c46
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 11 deletions.
40 changes: 34 additions & 6 deletions pom.xml
Expand Up @@ -15,10 +15,38 @@
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<site>
<id>imagebundler</id>
<url>file:///${basedir}/../temp</url>
</site>
</distributionManagement>

<scm>
<connection>
scm:git:ssh://github.com:443/ananthakumaran/maven-demo.git
</connection>
<developerConnection>
scm:git:ssh://github.com:443/ananthakumaran/maven-demo.git
</developerConnection>
<url>
scm:git:ssh://github.com:443/ananthakumaran/maven-demo.git
</url>
</scm>

<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<localCheckout>true</localCheckout>
</configuration>
</plugin>
</plugins>
</build>

<distributionManagement>
<site>
<id>maven-demo</id>
<url>file:///${basedir}/../temp</url>
</site>
<repository>
<id>maven-demo</id>
<url>file:///${basedir}/../temp/maven2 </url>
</repository>
</distributionManagement>
</project>
33 changes: 28 additions & 5 deletions rakefile.rb
@@ -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

0 comments on commit fe31c46

Please sign in to comment.