未验证 提交 b5bc72f4 编写于 作者: P Peter Pan 提交者: GitHub

build: get rid of wget or curl, use npm pack instead (#586)

上级 a749faef
...@@ -15,10 +15,8 @@ build_frontend_from_source() { ...@@ -15,10 +15,8 @@ build_frontend_from_source() {
build_frontend() { build_frontend() {
local PACKAGE_NAME="visualdl" local PACKAGE_NAME="visualdl"
local SRC=`npm view ${PACKAGE_NAME}@latest dist.tarball` local PACKAGE=`(cd $BUILD_DIR && npm pack ${PACKAGE_NAME}@latest)`
# wget $SRC -O "$BUILD_DIR/$PACKAGE_NAME.tar.gz" tar zxf "$BUILD_DIR/$PACKAGE" -C "$BUILD_DIR"
curl -o "$BUILD_DIR/$PACKAGE_NAME.tar.gz" $SRC
tar zxf "$BUILD_DIR/$PACKAGE_NAME.tar.gz" -C "$BUILD_DIR"
} }
build_frontend_fake() { build_frontend_fake() {
...@@ -49,7 +47,7 @@ clean_env() { ...@@ -49,7 +47,7 @@ clean_env() {
rm -rf $BUILD_DIR/lib* rm -rf $BUILD_DIR/lib*
rm -rf $BUILD_DIR/temp* rm -rf $BUILD_DIR/temp*
rm -rf $BUILD_DIR/scripts* rm -rf $BUILD_DIR/scripts*
rm -rf $BUILD_DIR/*.tar.gz rm -rf $BUILD_DIR/*.tgz
rm -rf $BUILD_DIR/package rm -rf $BUILD_DIR/package
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册