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静态化钩子函数编写 由于以往的文章当中的图片路径都是写的本地路径