hack docker gpd update
This commit is contained in:
parent
3f65ab3143
commit
44a3cc189c
2 changed files with 8 additions and 5 deletions
|
@ -11,7 +11,8 @@ async function isOutdated() {
|
|||
}
|
||||
|
||||
async function updateGPD() {
|
||||
const command = `npm update ${PACKAGENAME}`
|
||||
// https://blog.cloud66.com/using-node-with-docker/
|
||||
const command = `mv ./node_modules ./node_modules.tmp && mv ./node_modules.tmp ./node_modules && npm update ${PACKAGENAME}`
|
||||
await exec(command)
|
||||
}
|
||||
|
||||
|
@ -27,7 +28,9 @@ async function updateGPD() {
|
|||
if (process.env.UPDATE_GPD !== 'false') {
|
||||
async function update() {
|
||||
if (await isOutdated()) {
|
||||
await updateGPD()
|
||||
try {
|
||||
await updateGPD()
|
||||
} catch {}
|
||||
if (cc) cc.kill('sigint')
|
||||
cc.once('exit', () => console.log(`Updated ${PACKAGENAME}`))
|
||||
}
|
||||
|
|
|
@ -868,9 +868,9 @@
|
|||
"tiny-each-async" "2.0.3"
|
||||
|
||||
"get-product-name@1":
|
||||
"integrity" "sha512-wGH86drg3fzsb5mjKpYpvUCqkX5M8L8edheao/wnaSW6aT7FO9m+2ZMwOTQgTFOGysSDotFRqu0WVQkatAfY4g=="
|
||||
"resolved" "https://registry.npmjs.org/get-product-name/-/get-product-name-1.7.2.tgz"
|
||||
"version" "1.7.2"
|
||||
"integrity" "sha512-EmxDzytXhHuWSZbOIKc7aDKaCpprvFw9DaTXLtaaiG+KXT7SCwZUQYdGY/0BWmQmu6xrmJWggih/13+syCjKzw=="
|
||||
"resolved" "https://registry.npmjs.org/get-product-name/-/get-product-name-1.8.0.tgz"
|
||||
"version" "1.8.0"
|
||||
dependencies:
|
||||
"cheerio" "^1.0.0-rc.3"
|
||||
"child-process-promise" "^2.2.1"
|
||||
|
|
Loading…
Reference in a new issue