Separate extra dependencies if included with app
The tools include this directory in the tarball if the Go
application has extra dependencies that go-app-builder needs
in order to compile the app.
@@ -458,9 +458,16 @@ module HelperFunctions
self.shell("cp #{APPSCALE_HOME}/AppDashboard/setup/404.html #{meta_dir}")
self.shell("touch #{meta_dir}/log/server.log")
- if untar
+ return unless untar
+
self.shell("tar --file #{tar_path} --force-local --no-same-owner " +
"-C #{tar_dir} -zx")
+
+ # Separate extra dependencies for Go applications.
+ begin
+ FileUtils.mv("#{tar_dir}/gopath", "#{meta_dir}/gopath")
+ rescue Errno::ENOENT
+ # Only Go applications with extra dependencies have this directory.
end
end
