( id: string, username: string, password: string, settingsDirectory: string, overwriteSettings: boolean, gpgPassphrase: string | undefined = undefined )
| 49 | } |
| 50 | |
| 51 | export async function createAuthenticationSettings( |
| 52 | id: string, |
| 53 | username: string, |
| 54 | password: string, |
| 55 | settingsDirectory: string, |
| 56 | overwriteSettings: boolean, |
| 57 | gpgPassphrase: string | undefined = undefined |
| 58 | ) { |
| 59 | core.info(`Creating ${constants.MVN_SETTINGS_FILE} with server-id: ${id}`); |
| 60 | // when an alternate m2 location is specified use only that location (no .m2 directory) |
| 61 | // otherwise use the home/.m2/ path |
| 62 | await io.mkdirP(settingsDirectory); |
| 63 | await write( |
| 64 | settingsDirectory, |
| 65 | generate(id, username, password, gpgPassphrase), |
| 66 | overwriteSettings |
| 67 | ); |
| 68 | } |
| 69 | |
| 70 | // only exported for testing purposes |
| 71 | export function generate( |
no test coverage detected