-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: being able to change tizen certificate, and not only just RNV on…
…e easier
- Loading branch information
1 parent
67ef77e
commit 9b678d1
Showing
4 changed files
with
34 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { createTask, RnvTaskName } from '@rnv/core'; | ||
import { SdkPlatforms } from '../constants'; | ||
import fs from 'fs'; | ||
export default createTask({ | ||
description: 'Change tizen certificate', | ||
fn: async ({ ctx }) => { | ||
console.log('good'); | ||
|
||
// bad approach? | ||
ctx.paths.appConfig.configs.forEach(async (config: string) => { | ||
if (config.includes('base')) { | ||
const configFile = await JSON.parse(fs.readFileSync(config, 'utf-8')); | ||
|
||
configFile.platforms.tizen.certificateProfile = 'newCert'; | ||
configFile.platforms.tizenwatch.certificateProfile = 'newCert'; | ||
configFile.platforms.tizenmobile.certificateProfile = 'newCert'; | ||
|
||
fs.writeFileSync(config, JSON.stringify(configFile, null, 2)); | ||
} | ||
}); | ||
|
||
// should do a simple thing - update core/src/schema/defaults.ts certificateProfile key | ||
// AND update certificateProfile key in template-starter/appConfigs/base/renative.json platforms.tizen, platforms.tizenwatch and platforms.tizenmobile | ||
}, | ||
task: RnvTaskName.tizenCertificate, | ||
platforms: SdkPlatforms, | ||
isGlobalScope: true, | ||
}); |
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