OSDN Git Service

prepare up to Maven Central.
authorSet <set.minami@gmail.com>
Tue, 30 Jul 2013 03:34:33 +0000 (12:34 +0900)
committerSet <set.minami@gmail.com>
Tue, 30 Jul 2013 03:34:33 +0000 (12:34 +0900)
build.pl [new file with mode: 0644]
build.sbt
build.sh [new file with mode: 0755]

diff --git a/build.pl b/build.pl
new file mode 100644 (file)
index 0000000..b5ffabc
--- /dev/null
+++ b/build.pl
@@ -0,0 +1,38 @@
+use strict;
+use warnings;
+
+my $file = "./build.sbt";
+open(my $fh, "<", $file)||die "Cannot open $file: $!";
+
+my @name = map /^name\s?:=\s?\"(.*)\"\s*$/i, <$fh>;
+seek $fh,0,0;
+my @version = map /^Version\s?:=\s?\"(.*)\"\s*$/i,<$fh>;
+seek $fh,0,0;
+my @scala_version = map /^scalaVersion\s?:=\s?\"(.*)\"\s*$/i,<$fh>;
+
+close($fh);
+
+my $AppName = $name[0];
+my $version = $version[0];
+my $scalaVersion = "";
+if( $scala_version[0] =~ /(.*)\.0$/){
+       $scalaVersion = $1;
+}else{
+       $scalaVersion = $scala_version[0];
+}
+print "AppName = " . $AppName;
+print "\n";
+print "Version = " . $version;
+print "\n";
+print "Scala Version = " . $scalaVersion;
+print "\n";
+
+my $whereami = `pwd`;
+chomp $whereami;
+
+my $jarFile = $whereami . "/target/scala-" . $scalaVersion . "/" . $AppName . "-assembly-" . $version . ".jar";
+if (-e $jarFile) {
+       print "Found executable jar @ " . $jarFile . "\n";
+}else{
+       print "executable jar file not found.";
+}
index 6ceef22..8a1ea74 100644 (file)
--- a/build.sbt
+++ b/build.sbt
@@ -13,6 +13,8 @@ version := "0.1.0"
 
 scalaVersion := "2.10.0"
 
+organization := "net.setminami"
+
 publishMavenStyle := true
 
 publishArtifact in Test := false
@@ -68,14 +70,14 @@ pomExtra := (
     </license>
   </licenses>
   <scm>
-    <url>git@github.com:jsuereth/scala-arm.git</url>
-    <connection>scm:git:git@github.com:jsuereth/scala-arm.git</connection>
+    <url>git@github.com:setminami/BlackQuill</url>
+    <connection>scm:git:git@github.com:setminami/BlackQuill.git</connection>
   </scm>
   <developers>
     <developer>
-      <id>jsuereth</id>
-      <name>Josh Suereth</name>
-      <url>http://jsuereth.com</url>
+      <id>SetMinami</id>
+      <name>Setsushi Minami</name>
+      <url>http://setminami.net</url>
     </developer>
   </developers>)
 
diff --git a/build.sh b/build.sh
new file mode 100755 (executable)
index 0000000..ede7dc2
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+if which sbt>/dev/null ; then
+       sbt compile ; sbt assembly
+else
+       echo "sbt is not installed in this system."
+fi
+
+if which perl>/dev/null ; then
+       perl ./build.pl
+else
+       echo "perl is not found"
+fi
\ No newline at end of file