14333aad by Nathan Lighthart

Create build system

- Add build_info.properties which contains the major, minor, and patch version numbers
- Update build script to put build version number into the jar manifest file
- Add actions to build script to increment major, minor, and patch version numbers
- Add manifest file to .gitignore file
1 parent 270de7a3
......@@ -11,3 +11,5 @@ nbactions.xml
......@@ -7,7 +7,7 @@
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="AgES-W" default="default" basedir=".">
<project name="AgES" default="default" basedir=".">
<description>Builds, tests, and runs the project AgES-W.</description>
<import file="nbproject/build-impl.xml" as="netbeans" />
......@@ -82,7 +82,18 @@
<property name="build.dir" value="build"/>
<property name="obj.dir" value="${build.dir}/obj"/>
<property name="gensrc.dir" value="${build.dir}/generated-sources/oms"/>
<property name="proj.dir" value="projects"/>
<property name="proj.dir" value="projects"/>
<!-- Version properties -->
<property name="project.name" value="AgES" />
<property name="implementation.name" value="ages" />
<property name="vendor.name" value="USDA/CSU" />
<format property="NOW" pattern="yyyy-MM-dd HH:mm:ss z" />
<property file="build_info.properties" />
<property name="build.version" value="${build.major.number}.${build.minor.number}.${build.patch.number}" />
<!-- NAP properties -->
<property name="fortran.files" value="**/*.f90, **/*.for, **/*.f"/>
......@@ -97,6 +108,27 @@
<!-- Fortran compilation properties -->
<property name="fortran.compile.flag" value="true" />
<target name="increment-patch" description="increments patch number">
<propertyfile file="build_info.properties">
<entry key="build.patch.number" type="int" operation="+" value="1" />
<target name="increment-minor" description="increments minor version">
<propertyfile file="build_info.properties">
<entry key="build.minor.number" type="int" operation="+" value="1"/>
<entry key="build.patch.number" type="int" value="0"/>
<target name="increment-major" description="increments major version">
<propertyfile file="build_info.properties">
<entry key="build.major.number" type="int" operation="+" value="1"/>
<entry key="build.minor.number" type="int" value="0"/>
<entry key="build.patch.number" type="int" value="0"/>
<path id="oms-cp" >
<fileset dir="${lib.dir}" erroronmissingdir="false">
......@@ -143,6 +175,17 @@
<linker name="gfortran"/>
<target name="-pre-init" description="actions that need to happen before project properties are initialized">
<manifest file="MANIFEST.MF">
<attribute name="Specification-Title" value="${project.name}" />
<attribute name="Specification-Version" value="${build.version}" />
<attribute name="Specification-Vendor" value="${vendor.name}" />
<attribute name="Implementation-Title" value="${implementation.name}" />
<attribute name="Implementation-Version" value="${build.version}" />
<attribute name="Implementation-Vendor" value="${vendor.name}" />
<target name="-post-init">
<mkdir dir="${obj.dir}"/>
......@@ -150,6 +193,9 @@
<target name="-pre-compile" depends="nap">
<manifest file="MANIFEST.MF" mode="update">
<attribute name="Build-Time" value="${NOW}" />
<target name="-post-jar" depends="compile-fortran">
#Tue, 18 Apr 2017 12:31:35 -0600
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!