mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
forgot to build and lint
This commit is contained in:
parent
6e0fcb38f5
commit
ebb46eab94
2 changed files with 10 additions and 5 deletions
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
@ -13208,6 +13208,7 @@ const util = __importStar(__webpack_require__(322));
|
||||||
const xmlbuilder2_1 = __webpack_require__(255);
|
const xmlbuilder2_1 = __webpack_require__(255);
|
||||||
exports.M2_DIR = '.m2';
|
exports.M2_DIR = '.m2';
|
||||||
exports.TEMP_DIR = util.getTempDir();
|
exports.TEMP_DIR = util.getTempDir();
|
||||||
|
exports.GPG_HOME_DIR = path.join(exports.TEMP_DIR, '.gnupg');
|
||||||
exports.SETTINGS_FILE = 'settings.xml';
|
exports.SETTINGS_FILE = 'settings.xml';
|
||||||
exports.PRIVATE_KEY_FILE = 'private-key.asc';
|
exports.PRIVATE_KEY_FILE = 'private-key.asc';
|
||||||
exports.DEFAULT_ID = 'github';
|
exports.DEFAULT_ID = 'github';
|
||||||
|
@ -13263,7 +13264,7 @@ function generate(id, username, password, gpgPassphrase = null) {
|
||||||
activeByDefault: true
|
activeByDefault: true
|
||||||
},
|
},
|
||||||
properties: {
|
properties: {
|
||||||
'gpg.homedir': exports.TEMP_DIR
|
'gpg.homedir': exports.GPG_HOME_DIR
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -13296,7 +13297,7 @@ function remove(path) {
|
||||||
function importGPG(gpgPrivateKey) {
|
function importGPG(gpgPrivateKey) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield write(exports.TEMP_DIR, exports.PRIVATE_KEY_FILE, gpgPrivateKey);
|
yield write(exports.TEMP_DIR, exports.PRIVATE_KEY_FILE, gpgPrivateKey);
|
||||||
yield exec.exec('gpg', ['--import', '--batch', exports.PRIVATE_KEY_FILE], {
|
yield exec.exec('gpg', ['--homedir', exports.GPG_HOME_DIR, '--import', '--batch', exports.PRIVATE_KEY_FILE], {
|
||||||
cwd: exports.TEMP_DIR
|
cwd: exports.TEMP_DIR
|
||||||
});
|
});
|
||||||
yield remove(path.join(exports.TEMP_DIR, exports.PRIVATE_KEY_FILE));
|
yield remove(path.join(exports.TEMP_DIR, exports.PRIVATE_KEY_FILE));
|
||||||
|
|
10
src/auth.ts
10
src/auth.ts
|
@ -124,8 +124,12 @@ async function remove(path: string) {
|
||||||
|
|
||||||
async function importGPG(gpgPrivateKey: string) {
|
async function importGPG(gpgPrivateKey: string) {
|
||||||
await write(TEMP_DIR, PRIVATE_KEY_FILE, gpgPrivateKey);
|
await write(TEMP_DIR, PRIVATE_KEY_FILE, gpgPrivateKey);
|
||||||
await exec.exec('gpg', ['--homedir', GPG_HOME_DIR, '--import', '--batch', PRIVATE_KEY_FILE], {
|
await exec.exec(
|
||||||
cwd: TEMP_DIR
|
'gpg',
|
||||||
});
|
['--homedir', GPG_HOME_DIR, '--import', '--batch', PRIVATE_KEY_FILE],
|
||||||
|
{
|
||||||
|
cwd: TEMP_DIR
|
||||||
|
}
|
||||||
|
);
|
||||||
await remove(path.join(TEMP_DIR, PRIVATE_KEY_FILE));
|
await remove(path.join(TEMP_DIR, PRIVATE_KEY_FILE));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue