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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add netlify --json flag option #1207

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JakubKoralewski
Copy link

@JakubKoralewski JakubKoralewski commented Aug 21, 2020

My attempt at #1206. I don't know Ruby much or the codebase. This works for me at the moment, but is probably somehow broken. I wouldn't be offended if someone wanted to do this differently.

I couldn't get Ruby, bundle, rspec to work locally so I tested it by running it on my deployment 馃き. Although it turned out Travis automatically runs tests for forks of dpl (?) so I used that as well.

Initially the idea was to export an environment variable, but it was not accessible in the after_deploy script. The current solution is to write a ./NETLIFY_DEPLOY_JSON_ID_<SITE_ID>.json file. If someone deploys the whole repo I guess this could be a problem, I guess home directory would be better?

Turns out it's not being saved in $TRAVIS_BUILD_DIR as I expected but somewhere else? Does anyone know where I can find that file 馃ズ ? Ok it turns out it is being saved to wherever you cd inside before_deploy which makes sense.

@JakubKoralewski
Copy link
Author

I've chosen to use an echo "..." > instead of write_file cause it didn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant