使用bat脚本部署hexo到coding和github

因项目的不同适当的改造吧,本文以hexo为例。

拉取coding.net的代码和github的代码到本地

  1. 确保代码能够正常的运行,commit,push
  2. 在项目的目录外新建一个push.bat文件

快速预览

如何一步到位提交到仓库

脚本中的变量说明

  • artsPath 新增文章的目录
  • codingPath coding的目录
  • githubPath github的目录

复制文章然后自动执行命令进行部署

修改脚本中对应的路径后执行push

1
2
3
4
5
6
7
8
xcopy F:\CodingRepos\ymhexo\arts F:\CodingRepos\ymhexo\yimocoding\source\_posts /Y
cd F:\CodingRepos\ymhexo\yimocoding
call git pull
call hexo clean
call hexo d -g
call git add *
call git commit -m AddArticle
call git push

windows下使用bat脚本部署hexo到coding和github

拉取coding.net的代码和github的代码到本地

确保代码能够正常的运行,commit,push
新建一个push.bat文件
然后copy下面的代码再改改路径,将文章放到arts目录后运行push即可

  • artsPath 新增文章的目录
  • codingPath coding的目录
  • githubPath github的目录

如何一步到位提交到仓库

复制文章然后自动执行命令进行部署

修改脚本中对应的路径后执行push

1
2
3
4
5
6
7
8
xcopy F:\CodingRepos\ymhexo\arts F:\CodingRepos\ymhexo\yimocoding\source\_posts /Y
cd F:\CodingRepos\ymhexo\yimocoding
call git pull
call hexo clean
call hexo d -g
call git add *
call git commit -m AddArticle
call git push

weexpack打包weex项目运行及打包记录

构建weex项目

  1. 安装weex-toolkit cnpm install -g weex-toolkit
  2. 初始化一个项目只需新建文件夹并在目录下执行 weex init 即可
  3. 安装依赖:cnpm install
  4. 编译项目:npm run dev
  5. 启动服务器:npm run serve //可以修改package.json的端口号来改变监听端口
  6. 可以执行的命令一览
    图片

使用Python多渠道打包apk

往apk包中追加到一个空文件到META-INF目录以标识渠道,Android中获取此文件即可获得App的下载渠道

  1. 首先在info文件夹新建一个qdb.txt的空文本文件
  2. 新建channel.txt存放渠道来源
  3. 运行Python代码即可将目录下的apk生成多渠道文件包