Skip to content

Rerun the build script if .env has been changed. #1773

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

Merged
merged 1 commit into from
Jun 24, 2019

Conversation

smarnach
Copy link
Contributor

Edits to .env may alter the value of the TEST_DATABASE_URL environment variable, so we should
rerun the build script if .env was changed. The build script is already configured to be rerun
when the value of TEST_DATABASE_URL changes, but the current setup does not capture changes
performed via .env, since the environment file is only loaded at runtime of the build script.

This change also removes the redundant cargo:rerun-if-changed=build.rs; the build script is always
rerun if it is changed.

Edits to `.env` may alter the value of the `TEST_DATABASE_URL` environment variable, so we should
rerun the build script if `.env` was changed. The build script is already configured to be rerun
when the value of `TEST_DATABASE_URL` changes, but the current setup does not capture changes
performed via `.env`, since the environment file is only loaded at runtime of the build script.

This change also removes the redundant `cargo:rerun-if-changed=build.rs`; the build script is always
rerun if it is changed.
@sgrif
Copy link
Contributor

sgrif commented Jun 24, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented Jun 24, 2019

📌 Commit 2653c12 has been approved by sgrif

@bors
Copy link
Contributor

bors commented Jun 24, 2019

⌛ Testing commit 2653c12 with merge 9118e2f...

bors added a commit that referenced this pull request Jun 24, 2019
Rerun the build script if `.env` has been changed.

Edits to `.env` may alter the value of the `TEST_DATABASE_URL` environment variable, so we should
rerun the build script if `.env` was changed. The build script is already configured to be rerun
when the value of `TEST_DATABASE_URL` changes, but the current setup does not capture changes
performed via `.env`, since the environment file is only loaded at runtime of the build script.

This change also removes the redundant `cargo:rerun-if-changed=build.rs`; the build script is always
rerun if it is changed.
@bors
Copy link
Contributor

bors commented Jun 24, 2019

☀️ Test successful - checks-travis
Approved by: sgrif
Pushing 9118e2f to master...

@bors bors merged commit 2653c12 into rust-lang:master Jun 24, 2019
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.

3 participants