mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-11-06 05:35:51 -05:00
Display libexecdir
This commit is contained in:
parent
c263b24136
commit
cb88a0fce7
3 changed files with 20 additions and 8 deletions
14
dist/index.js
generated
vendored
14
dist/index.js
generated
vendored
|
@ -1025,10 +1025,11 @@ function run() {
|
||||||
core.info('📣 GnuPG info');
|
core.info('📣 GnuPG info');
|
||||||
const version = yield gpg.getVersion();
|
const version = yield gpg.getVersion();
|
||||||
const dirs = yield gpg.getDirs();
|
const dirs = yield gpg.getDirs();
|
||||||
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`);
|
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`);
|
||||||
core.info(`Homedir : ${dirs.homedir}`);
|
core.info(`Libdir : ${dirs.libdir}`);
|
||||||
core.info(`Datadir : ${dirs.datadir}`);
|
core.info(`Libexecdir : ${dirs.libexecdir}`);
|
||||||
core.info(`Libdir : ${dirs.libdir}`);
|
core.info(`Datadir : ${dirs.datadir}`);
|
||||||
|
core.info(`Homedir : ${dirs.homedir}`);
|
||||||
core.info('🔮 Checking signing key...');
|
core.info('🔮 Checking signing key...');
|
||||||
const privateKey = yield openpgp.readPrivateKey(process.env.SIGNING_KEY);
|
const privateKey = yield openpgp.readPrivateKey(process.env.SIGNING_KEY);
|
||||||
core.debug(`Fingerprint : ${privateKey.fingerprint}`);
|
core.debug(`Fingerprint : ${privateKey.fingerprint}`);
|
||||||
|
@ -1143,12 +1144,16 @@ exports.getDirs = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
throw new Error(res.stderr);
|
throw new Error(res.stderr);
|
||||||
}
|
}
|
||||||
let libdir = '';
|
let libdir = '';
|
||||||
|
let libexecdir = '';
|
||||||
let datadir = '';
|
let datadir = '';
|
||||||
let homedir = '';
|
let homedir = '';
|
||||||
for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) {
|
for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) {
|
||||||
if (line.startsWith('libdir:')) {
|
if (line.startsWith('libdir:')) {
|
||||||
libdir = line.substr('libdir:'.length).replace('%3a', ':').trim();
|
libdir = line.substr('libdir:'.length).replace('%3a', ':').trim();
|
||||||
}
|
}
|
||||||
|
else if (line.startsWith('libexecdir:')) {
|
||||||
|
libexecdir = line.substr('libexecdir:'.length).replace('%3a', ':').trim();
|
||||||
|
}
|
||||||
else if (line.startsWith('datadir:')) {
|
else if (line.startsWith('datadir:')) {
|
||||||
datadir = line.substr('datadir:'.length).replace('%3a', ':').trim();
|
datadir = line.substr('datadir:'.length).replace('%3a', ':').trim();
|
||||||
}
|
}
|
||||||
|
@ -1158,6 +1163,7 @@ exports.getDirs = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
libdir: path.normalize(libdir),
|
libdir: path.normalize(libdir),
|
||||||
|
libexecdir: path.normalize(libexecdir),
|
||||||
datadir: path.normalize(datadir),
|
datadir: path.normalize(datadir),
|
||||||
homedir: path.normalize(homedir)
|
homedir: path.normalize(homedir)
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,6 +14,7 @@ export interface Version {
|
||||||
|
|
||||||
export interface Dirs {
|
export interface Dirs {
|
||||||
libdir: string;
|
libdir: string;
|
||||||
|
libexecdir: string;
|
||||||
datadir: string;
|
datadir: string;
|
||||||
homedir: string;
|
homedir: string;
|
||||||
}
|
}
|
||||||
|
@ -51,12 +52,15 @@ export const getDirs = async (): Promise<Dirs> => {
|
||||||
}
|
}
|
||||||
|
|
||||||
let libdir: string = '';
|
let libdir: string = '';
|
||||||
|
let libexecdir: string = '';
|
||||||
let datadir: string = '';
|
let datadir: string = '';
|
||||||
let homedir: string = '';
|
let homedir: string = '';
|
||||||
|
|
||||||
for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) {
|
for (let line of res.stdout.replace(/\r/g, '').trim().split(/\n/g)) {
|
||||||
if (line.startsWith('libdir:')) {
|
if (line.startsWith('libdir:')) {
|
||||||
libdir = line.substr('libdir:'.length).replace('%3a', ':').trim();
|
libdir = line.substr('libdir:'.length).replace('%3a', ':').trim();
|
||||||
|
} else if (line.startsWith('libexecdir:')) {
|
||||||
|
libexecdir = line.substr('libexecdir:'.length).replace('%3a', ':').trim();
|
||||||
} else if (line.startsWith('datadir:')) {
|
} else if (line.startsWith('datadir:')) {
|
||||||
datadir = line.substr('datadir:'.length).replace('%3a', ':').trim();
|
datadir = line.substr('datadir:'.length).replace('%3a', ':').trim();
|
||||||
} else if (line.startsWith('homedir:')) {
|
} else if (line.startsWith('homedir:')) {
|
||||||
|
@ -66,6 +70,7 @@ export const getDirs = async (): Promise<Dirs> => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
libdir: path.normalize(libdir),
|
libdir: path.normalize(libdir),
|
||||||
|
libexecdir: path.normalize(libexecdir),
|
||||||
datadir: path.normalize(datadir),
|
datadir: path.normalize(datadir),
|
||||||
homedir: path.normalize(homedir)
|
homedir: path.normalize(homedir)
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,10 +13,11 @@ async function run(): Promise<void> {
|
||||||
core.info('📣 GnuPG info');
|
core.info('📣 GnuPG info');
|
||||||
const version = await gpg.getVersion();
|
const version = await gpg.getVersion();
|
||||||
const dirs = await gpg.getDirs();
|
const dirs = await gpg.getDirs();
|
||||||
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`);
|
core.info(`Version : ${version.gnupg} (libgcrypt ${version.libgcrypt})`);
|
||||||
core.info(`Homedir : ${dirs.homedir}`);
|
core.info(`Libdir : ${dirs.libdir}`);
|
||||||
core.info(`Datadir : ${dirs.datadir}`);
|
core.info(`Libexecdir : ${dirs.libexecdir}`);
|
||||||
core.info(`Libdir : ${dirs.libdir}`);
|
core.info(`Datadir : ${dirs.datadir}`);
|
||||||
|
core.info(`Homedir : ${dirs.homedir}`);
|
||||||
|
|
||||||
core.info('🔮 Checking signing key...');
|
core.info('🔮 Checking signing key...');
|
||||||
const privateKey = await openpgp.readPrivateKey(process.env.SIGNING_KEY);
|
const privateKey = await openpgp.readPrivateKey(process.env.SIGNING_KEY);
|
||||||
|
|
Loading…
Reference in a new issue