From d3d66956ffe51d5f4b319f8c4ed2146117a62477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=93=E5=8F=91=E5=8F=97=E9=95=BF=E7=94=9F?= Date: Sun, 21 Apr 2019 15:22:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9E=84=E5=BB=BA=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_posts/linux/博客图片迁移记.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/_posts/linux/博客图片迁移记.md b/source/_posts/linux/博客图片迁移记.md index e7572a8..23b4b03 100644 --- a/source/_posts/linux/博客图片迁移记.md +++ b/source/_posts/linux/博客图片迁移记.md @@ -87,7 +87,7 @@ module.exports = function (rootPath, imageFloder) { > 调用该模块暴露出的函数传入根目录和图片目录 比如imageFloder传入的是'images/' -获得的是形如 _\[{name:'images/a.png',md5:'xxx',...\]_ 的一个数组 +获得的是形如 _\[{name:'images/a.png',md5:'xxx'},...\]_ 的一个数组 #### auth_info.json 把访问对象仓库API需要的认证信息放在一个json文件当中 @@ -218,13 +218,12 @@ function uploadObject(filesList, index) { ### 3.持续集成 相关的js脚本在服务器上准备好之后, 就可以在持续集成当中写shell添加该脚本的调用了 ```bash -workspacePath=$(pwd) # 切换到nodejs脚本所在位置 cd /root/upload_picture -npm run start -- --rootPath ${workspacePath}/source/ +npm run start -- --rootPath ${WORKSPACE}/source/ ``` -> shell里面定义变量, 等号两边不能带空格 +> `WORKSPACE`是jenkins提供的一个环境变量, 代表工作空间分配给构建的目录的绝对路径 ### 4.hexo静态化钩子函数编写 由于以往的文章当中的图片路径都是写的本地路径