commit 32dd6c19c4c6bdfe61bcf24efe24b2b27225fed0
parent 0c91b41e533e62dd8e87a44be626756828761983
Author: Antoine A <>
Date: Mon, 23 Sep 2024 18:03:13 +0200
common: make dist smaller archive
Diffstat:
4 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/.gitattributes b/.gitattributes
@@ -0,0 +1,4 @@
+contrib/wallet-core/* export-ignore
+contrib/wallet-core/bank -export-ignore
+doc/prebuilt/* export-ignore
+doc/prebuilt/man/libeufin* -export-ignore
+\ No newline at end of file
diff --git a/Makefile b/Makefile
@@ -11,7 +11,7 @@ git_tag=$(shell git describe --tags)
gradle_version=$(shell ./gradlew -q libeufinVersion)
define versions_check =
- if test $(git_tag) != "v$(gradle_version)"; \
+ if test $(git_tag) != $(gradle_version); \
then echo WARNING: Project version from Gradle: $(gradle_version) differs from current Git tag: $(git_tag); fi
endef
@@ -37,7 +37,7 @@ build:
dist:
$(call versions_check)
mkdir -p build/distributions
- $(git-archive-all) --include ./configure build/distributions/libeufin-$(shell ./gradlew -q libeufinVersion)-sources.tar.gz
+ $(git-archive-all) --include ./configure build/distributions/libeufin-$(gradle_version)-sources.tar.gz
.PHONY: deb
deb:
diff --git a/build.gradle b/build.gradle
@@ -49,21 +49,23 @@ idea {
}
}
-task versionFile() {
+ext.getVersionWithGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
def gitHash = stdout.toString().trim()
- def version = getRootProject().version
- new File("${projectDir}/common/src/main/resources", "version.txt").text = "v$version-git-$gitHash"
+ return "v${project.version}-git-$gitHash"
+}
+
+task versionFile() {
+ new File("${projectDir}/common/src/main/resources", "version.txt").text = getVersionWithGitHash()
}
-// See: https://stackoverflow.com/questions/24936781/gradle-plugin-project-version-number
task libeufinVersion {
doLast {
- println project.version
+ println getVersionWithGitHash()
}
}
diff --git a/nexus/build.gradle b/nexus/build.gradle
@@ -47,7 +47,7 @@ dependencies {
}
application {
- mainClassName = "tech.libeufin.nexus.MainKt"
+ mainClass = "tech.libeufin.nexus.MainKt"
applicationName = "libeufin-nexus"
}