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

Use a shell script to set environment variables for a kit #995

Merged
merged 11 commits into from
Apr 6, 2020
Merged

Use a shell script to set environment variables for a kit #995

merged 11 commits into from
Apr 6, 2020

Conversation

timnoack
Copy link
Contributor

@timnoack timnoack commented Jan 6, 2020

This change addresses item #809

This adds a feature

The following changes are proposed:

  • Added the possibility to use a shell / batch script that sets the environment variables for a kit.
  • Added a unit test for this feature

Other Notes/Information

Some frameworks like the esp-idf / ESP8266_RTOS_SDK (ESP32 / ESP8266) use shell scripts to set the environment variables (especially update the PATH) for a build.

Uses the same approach as the function that gets the environment variables correspnding to a VS dev batch file (kit.ts collectDevBatVars)

@msftclas
Copy link

msftclas commented Jan 6, 2020

CLA assistant check
All CLA requirements met.

@not7cd
Copy link

not7cd commented Jan 20, 2020

@pisker, how easily do you think, one could source files?
I also found more related issues:
microsoft/vscode-remote-release#141
#288

@timnoack
Copy link
Contributor Author

@not7cd the feature works by setting the filename of a shell script which is run during initialization. No source / call command is required.

One constrained is that the shell script is (currently?) not run in bash. The source command is bash specific so it is not available within the shell script. The "." command can be used instead.

@bobbrow bobbrow added this to the On Deck milestone Jan 27, 2020
@pkohout
Copy link

pkohout commented Mar 25, 2020

Any plans on when this will be released? Would really improve the vs code experience for us.

schemas/kits-schema.json Outdated Show resolved Hide resolved
schemas/kits-schema.json Outdated Show resolved Hide resolved
schemas/kits-schema.json Outdated Show resolved Hide resolved
test/unit-tests/kitmanager.test.ts Outdated Show resolved Hide resolved
test/unit-tests/kitmanager.test.ts Outdated Show resolved Hide resolved
src/kit.ts Outdated Show resolved Hide resolved
src/kit.ts Outdated Show resolved Hide resolved
src/kit.ts Outdated Show resolved Hide resolved
src/kit.ts Outdated Show resolved Hide resolved
src/kit.ts Outdated Show resolved Hide resolved
@timnoack
Copy link
Contributor Author

timnoack commented Apr 3, 2020

@pisker, how easily do you think, one could source files?

The setup script is now run from /bin/bash. Because of that bash commands like source are available now

@bobbrow bobbrow merged commit 8e96fd8 into microsoft:develop Apr 6, 2020
@andreeis andreeis modified the milestones: On Deck, 1.4.0 Apr 7, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
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 this pull request may close these issues.

6 participants