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

feat(process): load ENV variables into process.env #10895

Merged
merged 6 commits into from May 30, 2019

Conversation

sgtcoolguy
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-27045

Description:

  • write env.json file with ENV variables
  • lazily load those values into process.env at runtime

@build
Copy link
Contributor

build commented May 15, 2019

Warnings
⚠️

iphone/cli/commands/_build.js#L6462 - iphone/cli/commands/build.js line 6462 – 'out' is defined but never used. Allowed unused args must match /^.+/. (no-unused-vars)

Messages
📖

✅ All tests are passing
Nice one! All 1939 tests are passing.
(There are 226 tests skipped)

Generated by 🚫 dangerJS against c1f6269

iphone/cli/commands/_build.js Outdated Show resolved Hide resolved
iphone/cli/commands/_build.js Outdated Show resolved Hide resolved
android/cli/commands/_build.js Show resolved Hide resolved
@sgtcoolguy
Copy link
Contributor Author

sgtcoolguy commented May 28, 2019

For QE testing:

run a build with something like:

MY_ENV_VAR=testing ti build -p ios

And an app.js with:

Ti.API.info(process.env.MY_ENV_VAR);

It should print out "testing" in the log.

Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed Able to load ENV variables into process.env.

Test Steps:

  1. Created a new Titanium application with the build from this PR
  2. Added the following in to the app.js:
    Ti.API.info(process.env.MY_ENV_VAR);
  3. Ran the following command:
    MY_ENV_VAR=testing ti build -p ios
  4. Able to see the following in the console:
    [INFO] testing

Test Environment

iPhone 6S plus (12.2 Sim)
APPC CLI: 7.0.12-70X.4
Operating System Name: Mac OS Mojave
Operating System Version: 10.14.2
Node.js Version: 8.11.3
Xcode 10.2.1

@sgtcoolguy sgtcoolguy merged commit ffe5f55 into tidev:master May 30, 2019
@sgtcoolguy sgtcoolguy deleted the process-env branch May 30, 2019 12:11
@hansemannn
Copy link
Collaborator

I think this pull request broke incremental builds. Can someone confirm? I noticed full rebuilds on every incremental build since last week. It can also be #10805 but I think it worked fine with that one.

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

Successfully merging this pull request may close these issues.

None yet

5 participants