Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
OLMIS-60 Add version number to login page
Browse files Browse the repository at this point in the history
During the build, edit the login page to show the version number from the version property file. Build number is either a custom developer build (the property file default) or can be passed in as a parameter.
  • Loading branch information
chunky56 committed Mar 18, 2016
1 parent 6d65527 commit e051457
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions build.gradle
Expand Up @@ -15,6 +15,11 @@ apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'properties'
apply plugin: 'sonar-runner'

ext.versionProps = new Properties()
versionProps.load(new FileInputStream("version.properties"))
versionProps.each { versionProp ->
ext.set(versionProp.key, versionProp.value)
}

idea.project.languageLevel = '1.7'
idea.project.jdkName = '1.7'
Expand Down
6 changes: 6 additions & 0 deletions modules/openlmis-web/build.gradle
Expand Up @@ -141,6 +141,12 @@ tasks.withType(War) {
else
"$line"
}
if (fileCopy.name.equals('login-form.html')) {
fileCopy.filter(ReplaceTokens, tokens: [major_version: majorVersion,
minor_version: minorVersion,
hotfix_version: hotfixVersion,
build_version: buildVersion])
}
}
}

Expand Down
Expand Up @@ -41,7 +41,7 @@ <h2 id="signInLabel" openlmis-message="label.sign.in"></h2>
</form>
</div>
<div class="powered-by">
Powered by <a href="http://openlmis.org" target="_blank">OpenLMIS</a>
Powered by <a href="http://openlmis.org" target="_blank">OpenLMIS</a> v@major_version@.@minor_version@.@hotfix_version@ build @build_version@
</div>
</div>

4 changes: 4 additions & 0 deletions version.properties
@@ -0,0 +1,4 @@
majorVersion = 2
minorVersion = 0
hotfixVersion = 1
buildVersion = Developer

0 comments on commit e051457

Please sign in to comment.