openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhe...@apache.org
Subject [openwhisk] branch master updated: Change absolute to relative file references (#4799)
Date Tue, 14 Jan 2020 15:09:43 GMT
This is an automated email from the ASF dual-hosted git repository.

mhenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new defa239  Change absolute to relative file references (#4799)
defa239 is described below

commit defa23969daeab3708d678a0f50b43438e2c9be3
Author: Sven Lange-Last <sven.lange-last@de.ibm.com>
AuthorDate: Tue Jan 14 16:09:29 2020 +0100

    Change absolute to relative file references (#4799)
    
    With this change, the standalone project build uses relative paths instead of absolute
paths starting from the root project. With these relative paths, the standalone project can
be built as sub-project of different root projects.
    
    Co-authored-by: gbildh <bildh@de.ibm.com>
---
 core/standalone/build.gradle | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/standalone/build.gradle b/core/standalone/build.gradle
index 6e97466..aa6ee52 100644
--- a/core/standalone/build.gradle
+++ b/core/standalone/build.gradle
@@ -52,7 +52,7 @@ def apiGwActions = ['createApi', "deleteApi", "getApi"]
 
 task copyGWActions() {
     doLast {
-        def routeMgmtDir = new File(project.projectDir.getParentFile(), "routemgmt")
+        def routeMgmtDir = new File(project.projectDir, "../routemgmt")
         def commonDir = new File(routeMgmtDir, "common")
         def routeBuildDir = mkdir("$buildDir/tmp/routemgmt")
         apiGwActions.each { actionName ->
@@ -85,7 +85,7 @@ task copyGWActions() {
 
 task copyGrafanaConfig() {
     doLast {
-        def grafanaDir = new File(project.rootProject.getProjectDir(), "core/monitoring/user-events/compose/grafana")
+        def grafanaDir = new File(project(':core:monitoring:user-events').projectDir, "compose/grafana")
         def grafanaBuildDir = mkdir("$buildDir/tmp/grafana")
         def zipFileName = "grafana-config.zip"
         def zipFile = new File(grafanaBuildDir, zipFileName)
@@ -103,17 +103,17 @@ processResources.dependsOn copyGWActions
 processResources.dependsOn copyGrafanaConfig
 
 processResources {
-    from(new File(project.rootProject.projectDir, "ansible/files/runtimes.json")) {
+    from(new File(project.projectDir, "../../ansible/files/runtimes.json")) {
         into(".")
     }
-    from(new File(project.rootProject.projectDir, "ansible/files")) {
+    from(new File(project.projectDir, "../../ansible/files")) {
         include "*.json"
         into("couch")
     }
     from(file("$buildDir/tmp/grafana/grafana-config.zip")){
         into(".")
     }
-    from(new File(project.rootProject.getProjectDir(), "core/monitoring/user-events/compose/prometheus/prometheus.yml")){
+    from(new File(project(':core:monitoring:user-events').projectDir, "compose/prometheus/prometheus.yml")){
         into(".")
     }
     //Implement the logic present in controller Docker file


Mime
View raw message