FINERACT-1166: Fix build to work outside git repository
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
0bc246b6b3
commit
20bf4d6939
@@ -201,11 +201,16 @@ import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
task prepareInputYaml(dependsOn: 'generateGitProperties') {
|
||||
doLast {
|
||||
if(project.ext.properties.containsKey("gitProps"))
|
||||
version = project.ext.gitProps['git.commit.id.describe']
|
||||
else
|
||||
version = "unknown"
|
||||
|
||||
copy {
|
||||
from file('config/swagger/fineract-input.yaml.template')
|
||||
into file('config/swagger')
|
||||
rename { String filename -> return 'fineract-input.yaml' }
|
||||
filter(ReplaceTokens, tokens: [VERSION: project.ext.gitProps['git.commit.id.describe']])
|
||||
filter(ReplaceTokens, tokens: [VERSION: version])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -955,11 +960,16 @@ dependencies {
|
||||
|
||||
task prepareConfigJson(dependsOn: 'generateGitProperties') {
|
||||
doLast {
|
||||
if(project.ext.properties.containsKey("gitProps"))
|
||||
version = project.ext.gitProps['git.commit.id.describe']
|
||||
else
|
||||
version = "unknown"
|
||||
|
||||
copy {
|
||||
from file('config/swagger/config.json.template')
|
||||
into file('config/swagger')
|
||||
rename { String filename -> return 'config.json' }
|
||||
filter(ReplaceTokens, tokens: [VERSION: project.ext.gitProps['git.commit.id.describe']])
|
||||
filter(ReplaceTokens, tokens: [VERSION: version])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user