Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(make): run UI build container as current user to avoid yarn build fail after make. #3635

Merged
merged 1 commit into from
Oct 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ $(SCOPE_UI_TOOLCHAIN_UPTODATE): client/yarn.lock $(SCOPE_UI_BUILD_UPTODATE)
-v $(shell pwd)/client:/home/weave/scope/client \
-v $(shell pwd)/$(SCOPE_UI_TOOLCHAIN):/home/weave/scope/client/node_modules \
-w /home/weave/scope/client \
-u $(shell id -u ${USER}):$(shell id -g ${USER}) \
$(SCOPE_UI_BUILD_IMAGE) yarn install; \
fi
touch $(SCOPE_UI_TOOLCHAIN_UPTODATE)
Expand All @@ -165,6 +166,7 @@ client/build/index.html: $(shell find client/app -type f) $(SCOPE_UI_TOOLCHAIN_U
-v $(shell pwd)/client:/home/weave/scope/client \
-v $(shell pwd)/$(SCOPE_UI_TOOLCHAIN):/home/weave/scope/client/node_modules \
-w /home/weave/scope/client \
-u $(shell id -u ${USER}):$(shell id -g ${USER}) \
$(SCOPE_UI_BUILD_IMAGE) yarn run build; \
fi

Expand All @@ -176,6 +178,7 @@ client/build-external/index.html: $(shell find client/app -type f) $(SCOPE_UI_TO
-v $(shell pwd)/client:/home/weave/scope/client \
-v $(shell pwd)/$(SCOPE_UI_TOOLCHAIN):/home/weave/scope/client/node_modules \
-w /home/weave/scope/client \
-u $(shell id -u ${USER}):$(shell id -g ${USER}) \
$(SCOPE_UI_BUILD_IMAGE) yarn run build-external; \
fi

Expand All @@ -185,6 +188,7 @@ client-test: $(shell find client/app/scripts -type f) $(SCOPE_UI_TOOLCHAIN_UPTOD
-v $(shell pwd)/client:/home/weave/scope/client \
-v $(shell pwd)/$(SCOPE_UI_TOOLCHAIN):/home/weave/scope/client/node_modules \
-w /home/weave/scope/client \
-u $(id -u ${USER}):$(id -g ${USER}) \
$(SCOPE_UI_BUILD_IMAGE) yarn test

client-lint: $(SCOPE_UI_TOOLCHAIN_UPTODATE)
Expand All @@ -193,6 +197,7 @@ client-lint: $(SCOPE_UI_TOOLCHAIN_UPTODATE)
-v $(shell pwd)/client:/home/weave/scope/client \
-v $(shell pwd)/$(SCOPE_UI_TOOLCHAIN):/home/weave/scope/client/node_modules \
-w /home/weave/scope/client \
-u $(shell id -u ${USER}):$(shell id -g ${USER}) \
$(SCOPE_UI_BUILD_IMAGE) yarn run lint

client-start: $(SCOPE_UI_TOOLCHAIN_UPTODATE)
Expand All @@ -202,6 +207,7 @@ client-start: $(SCOPE_UI_TOOLCHAIN_UPTODATE)
-v $(shell pwd)/$(SCOPE_UI_TOOLCHAIN):/home/weave/scope/client/node_modules \
-e WEBPACK_SERVER_HOST \
-w /home/weave/scope/client \
-u $(shell id -u ${USER}):$(shell id -g ${USER}) \
$(SCOPE_UI_BUILD_IMAGE) yarn start

client/bundle/weave-scope.tgz: $(shell find client/app -type f) $(SCOPE_UI_TOOLCHAIN_UPTODATE)
Expand All @@ -211,6 +217,7 @@ client/bundle/weave-scope.tgz: $(shell find client/app -type f) $(SCOPE_UI_TOOLC
-v $(shell pwd)/$(SCOPE_UI_TOOLCHAIN):/home/weave/scope/client/node_modules \
-v $(shell pwd)/tmp:/home/weave/tmp \
-w /home/weave/scope/client \
-u $(shell id -u ${USER}):$(shell id -g ${USER}) \
$(SCOPE_UI_BUILD_IMAGE) yarn run bundle

else
Expand Down