From 4d8dc69fc8adb5cb6c4e5e899bd2c92f9270c48f Mon Sep 17 00:00:00 2001 From: Jared Petersen Date: Wed, 15 Jul 2020 21:15:27 -0600 Subject: [PATCH] fixing defaults --- action.yml | 1 - dist/cleanup/index.js | 1 + dist/setup/index.js | 6 +++--- src/constants.ts | 1 + src/setup-java.ts | 6 +++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index 74cc2b5..553ff78 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,6 @@ inputs: description: 'Path to where the compressed JDK is located. The path could be in your source repository or a local path on the agent.' required: false - default: '' server-id: description: 'ID of the distributionManagement repository in the pom.xml file. Default is `github`' diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 7bf08a9..adff7eb 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -965,6 +965,7 @@ exports.INPUT_SERVER_PASSWORD = 'server-password'; exports.INPUT_SETTINGS_PATH = 'settings-path'; exports.INPUT_GPG_PRIVATE_KEY = 'gpg-private-key'; exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase'; +exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; diff --git a/dist/setup/index.js b/dist/setup/index.js index a9ddcdd..3beeeec 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -25665,6 +25665,7 @@ exports.INPUT_SERVER_PASSWORD = 'server-password'; exports.INPUT_SETTINGS_PATH = 'settings-path'; exports.INPUT_GPG_PRIVATE_KEY = 'gpg-private-key'; exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase'; +exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; @@ -28698,9 +28699,8 @@ function run() { const password = core.getInput(constants.INPUT_SERVER_PASSWORD, { required: false }); - const gpgPrivateKey = core.getInput(constants.INPUT_GPG_PRIVATE_KEY, { - required: false - }); + const gpgPrivateKey = core.getInput(constants.INPUT_GPG_PRIVATE_KEY, { required: false }) || + constants.INPUT_DEFAULT_GPG_PRIVATE_KEY; const gpgPassphrase = core.getInput(constants.INPUT_GPG_PASSPHRASE, { required: false }) || (gpgPrivateKey ? constants.INPUT_DEFAULT_GPG_PASSPHRASE : undefined); if (gpgPrivateKey) { diff --git a/src/constants.ts b/src/constants.ts index f4191dd..2e885cf 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -10,6 +10,7 @@ export const INPUT_SETTINGS_PATH = 'settings-path'; export const INPUT_GPG_PRIVATE_KEY = 'gpg-private-key'; export const INPUT_GPG_PASSPHRASE = 'gpg-passphrase'; +export const INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; export const INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; export const STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; diff --git a/src/setup-java.ts b/src/setup-java.ts index 90cc17c..db169f2 100644 --- a/src/setup-java.ts +++ b/src/setup-java.ts @@ -29,9 +29,9 @@ async function run() { const password = core.getInput(constants.INPUT_SERVER_PASSWORD, { required: false }); - const gpgPrivateKey = core.getInput(constants.INPUT_GPG_PRIVATE_KEY, { - required: false - }); + const gpgPrivateKey = + core.getInput(constants.INPUT_GPG_PRIVATE_KEY, {required: false}) || + constants.INPUT_DEFAULT_GPG_PRIVATE_KEY; const gpgPassphrase = core.getInput(constants.INPUT_GPG_PASSPHRASE, {required: false}) || (gpgPrivateKey ? constants.INPUT_DEFAULT_GPG_PASSPHRASE : undefined);