Skip to content

Commit

Permalink
Include VERSION file into packages
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 committed Dec 5, 2023
1 parent 6e9962b commit 3a9a8c2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
5 changes: 4 additions & 1 deletion distribution/archives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ apply plugin: 'opensearch.internal-distribution-archive-setup'

CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String platform, String architecture, JavaPackageType java) {
return copySpec {
into("opensearch-${version}") {
into("wazuh-indexer-${version}") {
into('lib') {
with libFiles()
}
Expand Down Expand Up @@ -71,6 +71,9 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String pla
pluginsDir.getParent()
}
}
into('') {
with versionFile()
}
from(rootProject.projectDir) {
include 'README.md'
}
Expand Down
7 changes: 7 additions & 0 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,13 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
}
}

versionFile = {
copySpec {
from(rootProject.file('VERSION'))
fileMode 0644
}
}

modulesFiles = { platform ->
copySpec {
eachFile {
Expand Down
9 changes: 9 additions & 0 deletions distribution/packages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ Closure commonPackageConfig(String type, boolean jdk, String architecture) {
with jdkFiles(project, 'linux', architecture)
}
}
into ('') {
with versionFile()
}
// we need to specify every intermediate directory in these paths so the package managers know they are explicitly
// intended to manage them; otherwise they may be left behind on uninstallation. duplicate calls of the same
// directory are fine
Expand All @@ -191,6 +194,12 @@ Closure commonPackageConfig(String type, boolean jdk, String architecture) {
}
}

// // Version file
// into('/usr/share/wazuh-indexer') {
// from(rootProject.file('VERSION'))
// fileMode 0644
// }

// license files
if (type == 'deb') {
into("/usr/share/doc/${packageName}") {
Expand Down

0 comments on commit 3a9a8c2

Please sign in to comment.