-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from TaitoUnited/chore/eas-env
Streamline EAS Update and EAS Build with EAS Environment Variables
- Loading branch information
Showing
21 changed files
with
97 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ src/locales/**/*.js | |
|
||
.env.figma | ||
.env | ||
.env.local | ||
|
||
# Expo managed workflow | ||
.expo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
import { config as devConfig } from './dev.config'; | ||
import { config as testConfig } from './test.config'; | ||
import { config as stagConfig } from './stag.config'; | ||
import { config as prodConfig } from './prod.config'; | ||
import { config as testConfig } from './test.config'; | ||
|
||
export function getConfig(env: string) { | ||
switch (env) { | ||
case 'dev': | ||
return devConfig; | ||
case 'test': | ||
return testConfig; | ||
case 'stag': | ||
return stagConfig; | ||
case 'prod': | ||
return prodConfig; | ||
default: | ||
throw new Error( | ||
`Invalid app env: ${env}! Must be one of 'dev', 'test', 'stag' or 'prod'.` | ||
`Invalid app env: ${env}! Must be one of 'dev', 'test' or 'prod'.` | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Secrets & Environment Variables | ||
|
||
We are using EAS Environment Variables to store secrets and environment variables. You can find more information in the [EAS documentation](https://docs.expo.dev/eas/environment-variables/). | ||
|
||
## Getting environment variables from EAS | ||
|
||
You can retrieve the environment variables from EAS by running the following command to use for local development: | ||
|
||
```bash | ||
eas env:pull | ||
``` | ||
|
||
It will create a `.env.local` file in the root of the project with the environment variables. You can then use them in the project. | ||
|
||
> Note: It will not be able to pull the ones with the visibility set to "secret" for security reasons. These should be available in the password vault of the project. | ||
## Adding environment variables to EAS | ||
|
||
### Via CLI | ||
|
||
You can add environment variables to EAS via the CLI by running the following command: | ||
|
||
```bash | ||
eas env:push | ||
``` | ||
|
||
It will ask you for which environment you want to push to variables. | ||
|
||
> Note: It will take **all** the variables from the `.env` file you provide. | ||
### Via Web UI | ||
|
||
You can manually add environment variables to EAS in _Configuration_ -> _Environment variables_. You can add them one by one or in bulk by uploading a `.env` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.