Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Passing build info from scons to gradle RPM build (#627)
Browse files Browse the repository at this point in the history
* groovy...passing build info from scons
* properties parser
  • Loading branch information
tst-dsugar authored and tst-ccamp committed Dec 11, 2017
1 parent 9acd3e0 commit d419157
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -20,3 +20,4 @@ earth_enterprise/tutorial/FusionTutorial/KML
/*.creator.user
/*.files
/*.includes

4 changes: 4 additions & 0 deletions earth_enterprise/SConstruct
Expand Up @@ -26,6 +26,10 @@ EnsureSConsVersion(0, 96, 92)

# process commandline arguments
installdir = ARGUMENTS.get('installdir', '/tmp/fusion_os_install')
with open('rpms/build.properties', 'w') as f:
print >> f, "## Auto-generated file from scons."
print >> f, "## Manual changes will be overwritten."
print >> f, str('staged=') + installdir.strip()

installdir = Dir(installdir)
def dir_cat(installdir, subdir1, subdir2):
Expand Down
1 change: 1 addition & 0 deletions earth_enterprise/rpms/.gitignore
@@ -1,2 +1,3 @@
build
build.properties
.gradle
12 changes: 11 additions & 1 deletion earth_enterprise/rpms/build.gradle
Expand Up @@ -55,8 +55,18 @@ def openGeeVersion =
it // The first string that remains is the version string.
}

def stagedInstall_path = '/tmp/fusion_os_install'
if (new File('build.properties').exists()) {
def props = new Properties()
new File('build.properties').withInputStream {
props.load(it)
}
if(props["staged"]) {
stagedInstall_path = props["staged"]
}
}

def stagedInstallDir = new File('/tmp/fusion_os_install')
def stagedInstallDir = new File(stagedInstall_path)
def stagedInstallDir_common = new File(stagedInstallDir, 'common')
def stagedInstallDir_common_opt = new File(stagedInstallDir, 'common/opt')
def stagedInstallDir_common_user_magic =
Expand Down

0 comments on commit d419157

Please sign in to comment.