@@ -74,7 +74,7 @@ export const bootstrapSops = async (
74
74
obj . keys = publicKey
75
75
if ( privateKey && ! process . env . SOPS_AGE_KEY ) {
76
76
process . env . SOPS_AGE_KEY = privateKey
77
- await deps . writeFile ( `${ env . ENV_DIR } /.secrets` , `SOPS_AGE_KEY=${ privateKey } ` )
77
+ await deps . writeFile ( `${ envDir } /.secrets` , `SOPS_AGE_KEY=${ privateKey } ` )
78
78
}
79
79
}
80
80
@@ -87,21 +87,21 @@ export const bootstrapSops = async (
87
87
d . info ( 'Copying sops related files' )
88
88
// add sops related files
89
89
const file = '.gitattributes'
90
- await deps . copyFile ( `${ rootDir } /.values/${ file } ` , `${ env . ENV_DIR } /${ file } ` )
90
+ await deps . copyFile ( `${ rootDir } /.values/${ file } ` , `${ envDir } /${ file } ` )
91
91
92
92
// prepare some credential files the first time and crypt some
93
93
if ( ! exists ) {
94
94
if ( isCli || env . OTOMI_DEV ) {
95
95
// first time so we know we have values
96
- const secretsFile = `${ env . ENV_DIR } /.secrets`
96
+ const secretsFile = `${ envDir } /.secrets`
97
97
d . log ( `Creating secrets file: ${ secretsFile } ` )
98
98
if ( provider === 'google' ) {
99
99
// and we also assume the correct values are given by using '!' (we want to err when not set)
100
100
const serviceKeyJson = JSON . parse ( values . kms . sops ! . google ! . accountJson as string )
101
101
// and set it in env for later decryption
102
102
process . env . GCLOUD_SERVICE_KEY = values . kms . sops ! . google ! . accountJson
103
103
d . log ( 'Creating gcp-key.json for vscode.' )
104
- await deps . writeFile ( `${ env . ENV_DIR } /gcp-key.json` , JSON . stringify ( serviceKeyJson ) )
104
+ await deps . writeFile ( `${ envDir } /gcp-key.json` , JSON . stringify ( serviceKeyJson ) )
105
105
d . log ( `Creating credentials file: ${ secretsFile } ` )
106
106
await deps . writeFile ( secretsFile , `GCLOUD_SERVICE_KEY=${ JSON . stringify ( JSON . stringify ( serviceKeyJson ) ) } ` )
107
107
} else if ( provider === 'aws' ) {
0 commit comments