This commit is contained in:
syuilo 2017-03-18 02:24:14 +09:00
parent 45b2b2b196
commit b73eb710e4
5 changed files with 1 additions and 39 deletions

View file

@ -87,7 +87,6 @@
"express": "4.15.2",
"file-type": "4.1.0",
"fuckadblock": "3.2.1",
"git-last-commit": "0.2.0",
"glob": "7.1.1",
"gm": "1.23.0",
"gulp": "3.9.1",

View file

@ -13,10 +13,9 @@ import * as cluster from 'cluster';
import * as debug from 'debug';
import Logger from './utils/logger';
import * as chalk from 'chalk';
import portUsed = require('tcp-port-used');
//import portUsed = require('tcp-port-used');
import isRoot = require('is-root');
import ProgressBar from './utils/cli/progressbar';
import LastCommitInfo from './utils/lastCommitInfo';
import EnvironmentInfo from './utils/environmentInfo';
import MachineInfo from './utils/machineInfo';
import DependencyInfo from './utils/dependencyInfo';
@ -98,7 +97,6 @@ async function init() {
Logger.info(chalk.bold('Misskey <aoi>'));
Logger.info('Initializing...');
await LastCommitInfo.show();
EnvironmentInfo.show();
MachineInfo.show();
new DependencyInfo().showAll();

View file

@ -1,21 +0,0 @@
import Logger from './logger';
import * as chalk from 'chalk';
import prominence = require('prominence');
import git = require('git-last-commit');
export default class {
static async show(): Promise<void> {
let logger = new Logger('LastCommit');
try {
const commit = await prominence(git).getLastCommit();
const shortHash: string = commit.shortHash;
const hash: string = commit.hash;
const commitDate = new Date(parseInt(commit.committedOn, 10) * 1000).toLocaleDateString('ja-JP');
const commitTime = new Date(parseInt(commit.committedOn, 10) * 1000).toLocaleTimeString('ja-JP');
logger.info(`${shortHash}${chalk.gray(hash.substr(shortHash.length))}`);
logger.info(`${commit.subject} ${chalk.green(`(${commitDate} ${commitTime})`)} ${chalk.blue(`<${commit.author.name}>`)}`);
} catch (e) {
logger.info('No commit information found');
}
}
}

View file

@ -1,13 +0,0 @@
import * as express from 'express';
import git = require('git-last-commit');
module.exports = async (req: express.Request, res: express.Response) => {
// Get commit info
git.getLastCommit((err, commit) => {
res.send({
commit: commit
});
}, {
dst: `${__dirname}/../../`
});
};

View file

@ -47,7 +47,6 @@ app.use('/resources', express.static(`${__dirname}/resources`, {
/**
* Common API
*/
app.get(/\/api:meta/, require('./meta'));
app.get(/\/api:url/, require('./service/url-preview'));
app.post(/\/api:rss/, require('./service/rss-proxy'));