FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mashlib-jss/timestamp.sh at main · JavaScriptSolidServer/mashlib-jss · GitHub
JavaScriptSolidServer
mashlib-jss
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
mashlib-jss
/
timestamp.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
22 lines (21 loc) · 519 Bytes
Breadcrumbs
mashlib-jss
/
timestamp.sh
Copy path
File metadata and controls
executable file
·
22 lines (21 loc) · 519 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!
/bin/bash
echo
"
export default {
"
date -u
'
+ buildTime: "%Y-%m-%dT%H:%M:%SZ",
'
if
[
-d
.git ]
;
then
commit=
$(
git log --pretty=format:
'
%H
'
-n 1
)
else
commit=
"
unknown
"
fi
echo
"
commit:
\"
$commit
\"
,
"
echo
"
npmInfo: {
"
npm version
|
grep -v
'
^{
'
|
while
IFS=:
read
key value
;
do
key=
$(
echo
"
$key
"
|
xargs
)
value=
$(
echo
$value
|
xargs
)
#
Remove any trailing comma from value
value=
$(
echo
"
$value
"
|
sed
'
s/,$//
'
)
if
[
"
$key
"
!=
"
}
"
]
;
then
echo
"
'
$key
': '
$value
',
"
fi
done
echo
"
}
"
echo
"
}
"
Back
|
FazBrowse Home
|
New Git URL