Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Some files are changed when building rest-server or webportal. #3035

Closed
ydye opened this issue Jul 1, 2019 · 8 comments
Closed

Some files are changed when building rest-server or webportal. #3035

ydye opened this issue Jul 1, 2019 · 8 comments

Comments

@ydye
Copy link
Contributor

ydye commented Jul 1, 2019

Every time I build webportal or rest-server, the script does some change on the following files. And I have to do some git operation, or I can't checkout to another branch directly. Bad development experience.

git checkout xxxxxxx
error: Your local changes to the following files would be overwritten by checkout:
        src/rest-server/package.json
        src/webportal/package.json
Please, commit your changes or stash them before you can switch branches.
Aborting

@abuccts
Copy link
Member

abuccts commented Jul 2, 2019

What did you run?

@ydye
Copy link
Contributor Author

ydye commented Jul 2, 2019

What did you run?

clean branch, master , then build rest-server or webportal. You could have a try. Because a version is input into the package.json. So the code base is changed.

@abuccts
Copy link
Member

abuccts commented Jul 2, 2019

You only need the following commands for dev purpose:

yarn
yarn dev

@ydye
Copy link
Contributor Author

ydye commented Jul 2, 2019

Anyway, I will create a PR to handle this issue. I don't think testing webportal or rest-server locally is a good experience. And every time you trigger the build process, you will have to clean the code base. It's not reasonable.

@ydye
Copy link
Contributor Author

ydye commented Jul 2, 2019

@abuccts
Copy link
Member

abuccts commented Jul 2, 2019

You only need yarn dev or yarn build to build instead of running build-pre.sh, the script is only used in deployment.

@ydye
Copy link
Contributor Author

ydye commented Jul 2, 2019

@abuccts If you don't change the build logic, the problem still exits. Anyway, I have create the PR. And I prefer to test in docker container. So if you still think yarn dev or yarn build is better. Could you make some change on the building logic?

@ydye ydye closed this as completed Jul 2, 2019
@abuccts
Copy link
Member

abuccts commented Jul 2, 2019

I thought your problem is version in package.json will change in git repo.

The problem won't exist if you move npm version line into Dockerfile, it will change package.json file in Docker images, instead of your git repo.

abuccts added a commit that referenced this issue Jul 8, 2019
Move npm version to dockerfile in rest server and webportal.

Fixes #3035, #3100.
abuccts added a commit that referenced this issue Jul 8, 2019
Move npm version to dockerfile in rest server and webportal.

Fixes #3035, #3100.
abuccts added a commit that referenced this issue Jul 9, 2019
* Move npm version to dockerfile

Move npm version to dockerfile in rest server and webportal.

Fixes #3035, #3100.

* Use yarn version

Use `yarn version`.
debuggy pushed a commit that referenced this issue Jul 19, 2019
* Move npm version to dockerfile

Move npm version to dockerfile in rest server and webportal.

Fixes #3035, #3100.

* Use yarn version

Use `yarn version`.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants