{"action":"created","issue":{"url":"https://api.github.com/repos/laher/goxc/issues/98","repository_url":"https://api.github.com/repos/laher/goxc","labels_url":"https://api.github.com/repos/laher/goxc/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/laher/goxc/issues/98/comments","events_url":"https://api.github.com/repos/laher/goxc/issues/98/events","html_url":"https://github.com/laher/goxc/issues/98","id":139054067,"number":98,"title":"Bug: difference between zip contents, when the \"ResourcesInclude\" config setting has a path that is above the main path your building from, and its a windows build.","user":{"login":"joeblew99","id":11999859,"avatar_url":"https://avatars.githubusercontent.com/u/11999859?v=3","gravatar_id":"","url":"https://api.github.com/users/joeblew99","html_url":"https://github.com/joeblew99","followers_url":"https://api.github.com/users/joeblew99/followers","following_url":"https://api.github.com/users/joeblew99/following{/other_user}","gists_url":"https://api.github.com/users/joeblew99/gists{/gist_id}","starred_url":"https://api.github.com/users/joeblew99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeblew99/subscriptions","organizations_url":"https://api.github.com/users/joeblew99/orgs","repos_url":"https://api.github.com/users/joeblew99/repos","events_url":"https://api.github.com/users/joeblew99/events{/privacy}","received_events_url":"https://api.github.com/users/joeblew99/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-07T18:26:31Z","updated_at":"2016-03-07T18:49:07Z","closed_at":null,"body":"\r\nI am doing a Windows and a Darwin build and getting slightly different folder structure inside the final zip file. The files are all there correctly, its just that with windows build it adds an extra \"__Parent__\" folder.\r\n\r\nScreenshots to highlight difference (see the Red circle !!!!)\r\nFor the Darwin build it works fine. See Screen shot.\r\nFor the Windows build, it adds a \"__Parent__\", with its sub folder called \"toolbin\" See Screen shot.\r\n\r\nWindows Build:\r\n<img width=\"698\" alt=\"windows\" src=\"https://cloud.githubusercontent.com/assets/11999859/13578588/2c160eb8-e499-11e5-9e57-241a9a54ec38.png\">\r\n\r\n\r\nDarwin Build:\r\n<img width=\"672\" alt=\"darwin\" src=\"https://cloud.githubusercontent.com/assets/11999859/13578503/a79e4f60-e498-11e5-9638-522d6370f09e.png\">\r\n\r\nSteps to Reproduce:\r\nThe bug is caused when, in the build config, the \"ResourcesInclude\" has a path that is above the main path your building from, and its a windows build. I my case its the \"./../toolbin/*\" path that i am referencing in my config.\r\n\r\nOn your side side, to reproduce the bug, all you need to do is copy my config(s) and bash script(1), and just reference a folder in the \"ResourcesInclude\" that is above your main terminal path. \r\nI have included all config and scripts below.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nMy go env:\r\n````\r\nx-MacBook-Pro:backend apple$ go env\r\nGOARCH=\"amd64\"\r\nGOBIN=\"/Users/apple/workspace/go/bin\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"darwin\"\r\nGOOS=\"darwin\"\r\nGOPATH=\"/Users/apple/workspace/go\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/local/go\"\r\nGOTOOLDIR=\"/usr/local/go/pkg/tool/darwin_amd64\"\r\nGO15VENDOREXPERIMENT=\"\"\r\nCC=\"clang\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common\"\r\nCXX=\"clang++\"\r\nCGO_ENABLED=\"1\"\r\nx-MacBook-Pro:backend apple$ \r\n\r\n````\r\n\r\n\r\nMy bash script that kicks each off (tool-dist.sh):\r\n````\r\n#!/bin/bash\r\n\r\n\r\n# Globals\r\nBUILD_DIR=$PWD\"/_build/snapshot\"\r\nTOOLBIN_DIR=$PWD\"/_build/toolbin\"\r\n\r\n\r\n## delete leftover build artifacts\r\nrm -rf $BUILD_DIR\r\nrm -rf $TOOLBIN_DIR\r\n\r\n# Toggle which one you want to build.\r\n#goxc -c=tool-dist-windows\r\n\r\ngoxc -c=tool-dist-darwin\r\n````\r\n\r\n\r\n\r\nmy Windows conf (tool-dist-windows.goxc.json):\r\n````\r\n{\r\n    \"ConfigVersion\": \"0.9\",\r\n    \"TasksExclude\": [\r\n        \"go-test\",\r\n        \"go-vet\"\r\n    ],\r\n    \"ArtifactsDest\": \"_build\",\r\n    \"AppName\": \"backend\",\r\n    \"Arch\": \"amd64\",\r\n    \"Os\": \"windows\",\r\n    \"ResourcesInclude\": \"VERSIONDATE,VERSIONHASH,config*.*,_data/etlserver/*,run*.bat,./../toolbin/rethinkdb/windows_amd64/*,./../toolbin/caddy/windows_amd64/*,./../toolbin/chromium-portable/windows_amd64/*\",\r\n    \"ResourcesExclude\": \"*.gitkeep,*.gitignore,*.go,*.vagrant\",\r\n    \"MainDirsExclude\": \"Godeps,amzs3,./_infra/dev/rethinkdb-vm/.clear\"\r\n}\r\n````\r\n\r\nmy Darwin conf (tool-dist-darwin.goxc.json):\r\n````\r\n{\r\n    \"ConfigVersion\": \"0.9\",\r\n    \"TasksExclude\": [\r\n        \"go-test\",\r\n        \"go-vet\"\r\n    ],\r\n    \"ArtifactsDest\": \"_build\",\r\n    \"AppName\": \"backend\",\r\n    \"Arch\": \"amd64\",\r\n    \"Os\": \"darwin\",\r\n    \"ResourcesInclude\": \"VERSIONDATE,VERSIONHASH,config*.*,_data/etlserver/*,run*.sh,./../toolbin/rethinkdb/darwin_amd64/*,./../toolbin/caddy/darwin_amd64/*,./../toolbin/chromium-portable/darwin_amd64/*\",\r\n    \"ResourcesExclude\": \"*.gitkeep,*.gitignore,*.go,*.vagrant\",\r\n    \"MainDirsExclude\": \"Godeps,amzs3,./_infra/dev/rethinkdb-vm/.clear\"\r\n}\r\n````"},"comment":{"url":"https://api.github.com/repos/laher/goxc/issues/comments/193390624","html_url":"https://github.com/laher/goxc/issues/98#issuecomment-193390624","issue_url":"https://api.github.com/repos/laher/goxc/issues/98","id":193390624,"user":{"login":"joeblew99","id":11999859,"avatar_url":"https://avatars.githubusercontent.com/u/11999859?v=3","gravatar_id":"","url":"https://api.github.com/users/joeblew99","html_url":"https://github.com/joeblew99","followers_url":"https://api.github.com/users/joeblew99/followers","following_url":"https://api.github.com/users/joeblew99/following{/other_user}","gists_url":"https://api.github.com/users/joeblew99/gists{/gist_id}","starred_url":"https://api.github.com/users/joeblew99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeblew99/subscriptions","organizations_url":"https://api.github.com/users/joeblew99/orgs","repos_url":"https://api.github.com/users/joeblew99/repos","events_url":"https://api.github.com/users/joeblew99/events{/privacy}","received_events_url":"https://api.github.com/users/joeblew99/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T18:49:07Z","updated_at":"2016-03-07T18:49:07Z","body":"I have nailed it down further:\r\nOn Windows, when i unzip the windows build zip file, the \"__Parent__\" folder does not exist in the output\r\nOn OSX, when i unzip that same windows build zip on OSX, the \"__Parent__\" folder does exist in the output.\r\n"}}