Ai
1 Star 0 Fork 0

懒懒的狸花猫/tagspaces

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
versionmeta.js 735 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ilian Sapundshiev 提交于 2019-12-03 05:50 +08:00 . applying prettier
const sh = require('shelljs');
const { version, productName } = require('../app/package.json');
if (!sh.which('git')) {
sh.echo('Sorry, this script requires git');
sh.exit(1);
}
const buildTime = new Date().toISOString();
sh.exec(
'git log --format="%H" -n 1',
{ silent: true },
(code, lastCommitId) => {
if (lastCommitId.length > 1) {
lastCommitId = lastCommitId.slice(0, lastCommitId.length - 1);
}
sh.echo(
'{"commitId": "' +
lastCommitId +
'", "buildTime": "' +
buildTime +
'", "version": "' +
version +
'", "name": "' +
productName +
'"}'
).to('app/version.json');
// sh.sed('-i', 'BUILD_VERSION', 'v0.1.2', file);
}
);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dxpAndroid/tagspaces.git
git@gitee.com:dxpAndroid/tagspaces.git
dxpAndroid
tagspaces
tagspaces
develop

搜索帮助