File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ import * as tabs from './tabs'
6767import * as utils from './utils'
6868import * as login from './login/login'
6969import * as widgets from './widgets/index'
70- import { versionInfo } from './versionInfo'
70+ import versionInfo from './versionInfo'
7171import { initHeader } from './header'
7272import { initFooter } from './footer'
7373import * as createTypes from './create/types'
Original file line number Diff line number Diff line change 1- # Timestamp a git/npm project in node JS
2- echo " export const versionInfo = {"
1+ #! /bin/bash
2+
3+ echo " export default {"
34date -u ' +buildTime: "%Y-%m-%dT%H:%M:%SZ",'
45git log | grep commit | head -1 | sed -e ' s/ /: "/' | sed -e ' s/$/",/'
5- echo npmInfo:
6- npm version
7- echo " };"
6+ echo " npmInfo: {"
7+ npm version | sed ' s/\x1b\[[0-9;:]*[mG]//g' | grep -v ' ^{' | while read line; do
8+ key=$( echo " $line " | cut -d ' :' -f 1 | tr -d ' ' )
9+ value=$( echo " $line " | cut -d ' :' -f 2- | tr -d ' ' )
10+ echo " \" ${key} \" : \" ${value} \" ,"
11+ done
12+ echo " }"
13+ echo " };"
You can’t perform that action at this time.
0 commit comments