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

npm run build not reading uncommited config.js on local repo #16

Open
hermwong opened this issue Nov 8, 2017 · 1 comment
Open

npm run build not reading uncommited config.js on local repo #16

hermwong opened this issue Nov 8, 2017 · 1 comment
Assignees
Labels

Comments

@hermwong
Copy link
Contributor

hermwong commented Nov 8, 2017

Discovered this issue when I was trying to set up the deployment of the Stockpile on Firebase.

I had modified src/utils/config.js file on my local repo with my Adobe Stock API key.

I did not commit the changes in src/utils/config.js because I did not want to my Adobe Stock API key to be stored in the repository.

When I used npm run build to create the production build of the App for deployment on Firebase, it did not use my uncommitted version of src/utils/config.js, the build script used the last committed version of src/utils/config.js which contains a placeholder value for the Adobe Stock API key.

To get around this issue, I had to create a local branch and commit my modified src/utils/config.js before running npm run build to get the production build of the App to use my Adobe Stock API key.

@devgeeks
Copy link
Contributor

I think it's more related to git commands than npm run build.

I can change the file then run a build and it keeps my API key, but if I do a commit or something similar the key reverts to the *****'s

@devgeeks devgeeks self-assigned this Nov 13, 2017
@devgeeks devgeeks added the bug label Nov 13, 2017
devgeeks added a commit that referenced this issue Nov 13, 2017
This will run `git update-index --skip-worktree ./src/utils/config.js`
after `npm install`.

This keeps the local changes in `./src/utils/config.js` (such as ones
API KEY) from being tracked and accidentally uploaded to GitHub, etc.

This might help with #16, but it isn't a complete solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants