You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2017/05/22 21:21:51 UTC

[1/2] incubator-trafficcontrol git commit: change ownership of build artifacts in dist/. when build complete

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 850fdc36d -> 3c9f42b87


change ownership of build artifacts in dist/. when build complete


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5c8d1e45
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5c8d1e45
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5c8d1e45

Branch: refs/heads/master
Commit: 5c8d1e4546cca4c5c2a8de20d78966c418637837
Parents: 850fdc3
Author: Dan Kirkwood <da...@gmail.com>
Authored: Mon May 22 13:25:42 2017 -0600
Committer: David Neuman <da...@gmail.com>
Committed: Mon May 22 15:21:29 2017 -0600

----------------------------------------------------------------------
 infrastructure/docker/build/clean_build.sh | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5c8d1e45/infrastructure/docker/build/clean_build.sh
----------------------------------------------------------------------
diff --git a/infrastructure/docker/build/clean_build.sh b/infrastructure/docker/build/clean_build.sh
index 86fc7d7..b2b749b 100755
--- a/infrastructure/docker/build/clean_build.sh
+++ b/infrastructure/docker/build/clean_build.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env bash
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,9 +12,28 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
+# Fix ownership of output files
+#  $1 is file or dir with correct ownership
+#  remaining args are files/dirs to be fixed, recursively
+setowner() {
+    own=$(stat -c '%u:%g' $1)
+    shift
+    [[ -n $@ ]] && chown -R ${own} "$@"
+}
+
+cleanup() {
+    setowner /trafficcontrol /trafficcontrol/dist
+}
+
+trap cleanup EXIT
+
 set -x
+
+# set owner of dist dir -- cleans up existing dist permissions...
+cleanup
 cp -a /trafficcontrol /tmp/. && \
 	cd /tmp/trafficcontrol && \
 	rm -rf dist && \
-	ln -fs /trafficcontrol/dist dist &&
+	ln -fs /trafficcontrol/dist dist && \
 	((((./build/build.sh $1 2>&1; echo $? >&3) | tee ./dist/build-$1.log >&4) 3>&1) | (read x; exit $x)) 4>&1


[2/2] incubator-trafficcontrol git commit: This closes #596

Posted by ne...@apache.org.
This closes #596


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/3c9f42b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/3c9f42b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/3c9f42b8

Branch: refs/heads/master
Commit: 3c9f42b8768c626c96373eabe3ee41704196d0cb
Parents: 5c8d1e4
Author: David Neuman <da...@gmail.com>
Authored: Mon May 22 15:21:44 2017 -0600
Committer: David Neuman <da...@gmail.com>
Committed: Mon May 22 15:21:44 2017 -0600

----------------------------------------------------------------------

----------------------------------------------------------------------