Browse Source

Implemented a simple package script to be run in the head directory.

master
Drew Short 11 years ago
parent
commit
13386abba4
  1. 1
      name.info
  2. 13
      package.sh
  3. 24
      pom.xml
  4. 1
      src/includes/name.info
  5. 0
      src/includes/version.info
  6. 1
      version.info

1
name.info

@ -0,0 +1 @@
Image-Tools

13
package.sh

@ -1,2 +1,13 @@
#Build and package the application for distribution
#Getting variables that are produced by the script
VERSION=$(head -1 ./version.info)
NAME=$(head -1 ./name.info)
PACKAGENAME=$NAME-$VERSION
PACKAGETAR=$PACKAGENAME.tar.gz
PACKAGEZIP=$PACKAGENAME.zip
TARGET=$PWD/target
cd target/build/
echo "creating $PACKAGETAR in $TARGET"
tar -zcvf $TARGET/$PACKAGETAR .
echo "creating $PACKAGEZIP in $TARGET"
zip -r $TARGET/$PACKAGEZIP ./*

24
pom.xml

@ -179,7 +179,7 @@
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<phase>initialize</phase>
<goals>
<goal>copy-resources</goal>
</goals>
@ -205,12 +205,34 @@
<resource>
<directory>src/includes</directory>
<filtering>true</filtering>
<excludes>
<exclude>version.info</exclude>
<exclude>name.info</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<tasks>
<copy file="${project.build.directory}/version.info" toFile="${basedir}/version.info" overwrite="true" />
<copy file="${project.build.directory}/name.info" toFile="${basedir}/name.info" overwrite="true" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

1
src/includes/name.info

@ -0,0 +1 @@
${project.name}

0
src/includes/version.txt → src/includes/version.info

1
version.info

@ -0,0 +1 @@
0.1.0-DEV-0-1b3c9bf
Loading…
Cancel
Save