Skip to content

Commit

Permalink
Merge pull request #44 from rishiqing/beta
Browse files Browse the repository at this point in the history
log--mac安装包 & win 代码签名
  • Loading branch information
wgm7512 authored Apr 7, 2020
2 parents 73fafa1 + a16c9f9 commit 6eb2035
Show file tree
Hide file tree
Showing 12 changed files with 363 additions and 5,936 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
dist
package*
dev-app-update.yml
dev-app-update.yml
package-lock.json
252 changes: 126 additions & 126 deletions .rishiqing-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,131 +266,131 @@ x64-release:
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/win/x64/release'

# mac-beta:
# build:
# - 'npm run build-mac-beta'
# convert:
# target: package-beta/beta-mac.yml
# dest: package-beta/beta-mac.json
# resource:
# - dist: 'package-beta' # 资源所在目录 或者 文件路径
# ignore:
# - 'mac'
# - '/.yml$/'
# - '/.json/'
# - '/.blockmap$/'
# upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
# - type: 'aliyunOss'
# param:
# accessKeyId: ${ALY_OSS_Access_Id}
# secretAccessKey: ${ALY_OSS_Access_Key}
# bucket: 'tingkelai-client'
# endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
# prefix: 'pc-autoupdate/mac/beta'
# fileReplace:
# - dist: 'package-beta/beta-mac.yml' # 资源所在目录 或者 文件路径
# target: 'beta-mac.yml'
# upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
# - type: 'aliyunOss'
# param:
# accessKeyId: ${ALY_OSS_Access_Id}
# secretAccessKey: ${ALY_OSS_Access_Key}
# bucket: 'tingkelai-client'
# endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
# prefix: 'pc-autoupdate/mac/beta'
# - dist: 'package-beta/beta-mac.json' # 资源所在目录 或者 文件路径
# target: 'beta-mac.json'
# upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
# - type: 'aliyunOss'
# param:
# accessKeyId: ${ALY_OSS_Access_Id}
# secretAccessKey: ${ALY_OSS_Access_Key}
# bucket: 'tingkelai-client'
# endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
# prefix: 'pc-autoupdate/mac/beta'
mac-beta:
build:
- 'npm run build-mac-beta'
convert:
target: package-beta/beta-mac.yml
dest: package-beta/beta-mac.json
resource:
- dist: 'package-beta' # 资源所在目录 或者 文件路径
ignore:
- 'mac'
- '/.yml$/'
- '/.json/'
- '/.blockmap$/'
upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
- type: 'aliyunOss'
param:
accessKeyId: ${ALY_OSS_Access_Id}
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'tingkelai-client'
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/mac/beta'
fileReplace:
- dist: 'package-beta/beta-mac.yml' # 资源所在目录 或者 文件路径
target: 'beta-mac.yml'
upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
- type: 'aliyunOss'
param:
accessKeyId: ${ALY_OSS_Access_Id}
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'tingkelai-client'
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/mac/beta'
- dist: 'package-beta/beta-mac.json' # 资源所在目录 或者 文件路径
target: 'beta-mac.json'
upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
- type: 'aliyunOss'
param:
accessKeyId: ${ALY_OSS_Access_Id}
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'tingkelai-client'
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/mac/beta'

# mac-check:
# build:
# - 'npm run build-mac-release'
# convert:
# target: package-release/release-mac.yml
# dest: package-release/release-mac.json
# resource:
# - dist: 'package-release' # 资源所在目录 或者 文件路径
# ignore:
# - 'mac'
# - '/.yml$/'
# - '/.json/'
# - '/.blockmap$/'
# upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
# - type: 'aliyunOss'
# param:
# accessKeyId: ${ALY_OSS_Access_Id}
# secretAccessKey: ${ALY_OSS_Access_Key}
# bucket: 'tingkelai-client'
# endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
# prefix: 'pc-autoupdate/mac/check'
# fileReplace:
# - dist: 'package-release/release-mac.yml' # 资源所在目录 或者 文件路径
# target: 'release-mac.yml'
# upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
# - type: 'aliyunOss'
# param:
# accessKeyId: ${ALY_OSS_Access_Id}
# secretAccessKey: ${ALY_OSS_Access_Key}
# bucket: 'tingkelai-client'
# endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
# prefix: 'pc-autoupdate/mac/check'
# - dist: 'package-release/release-mac.json'
# target: 'release-mac.json'
# upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
# - type: 'aliyunOss'
# param:
# accessKeyId: ${ALY_OSS_Access_Id}
# secretAccessKey: ${ALY_OSS_Access_Key}
# bucket: 'tingkelai-client'
# endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
# prefix: 'pc-autoupdate/mac/check'
mac-check:
build:
- 'npm run build-mac-release'
convert:
target: package-release/release-mac.yml
dest: package-release/release-mac.json
resource:
- dist: 'package-release' # 资源所在目录 或者 文件路径
ignore:
- 'mac'
- '/.yml$/'
- '/.json/'
- '/.blockmap$/'
upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
- type: 'aliyunOss'
param:
accessKeyId: ${ALY_OSS_Access_Id}
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'tingkelai-client'
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/mac/check'
fileReplace:
- dist: 'package-release/release-mac.yml' # 资源所在目录 或者 文件路径
target: 'release-mac.yml'
upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
- type: 'aliyunOss'
param:
accessKeyId: ${ALY_OSS_Access_Id}
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'tingkelai-client'
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/mac/check'
- dist: 'package-release/release-mac.json'
target: 'release-mac.json'
upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
- type: 'aliyunOss'
param:
accessKeyId: ${ALY_OSS_Access_Id}
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'tingkelai-client'
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/mac/check'

# mac-release:
# build:
# - 'npm run build-mac-release'
# convert:
# target: package-release/release-mac.yml
# dest: package-release/release-mac.json
# resource:
# - dist: 'package-release' # 资源所在目录 或者 文件路径
# ignore:
# - 'mac'
# - '/.yml$/'
# - '/.json/'
# - '/.blockmap$/'
# upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
# - type: 'aliyunOss'
# param:
# accessKeyId: ${ALY_OSS_Access_Id}
# secretAccessKey: ${ALY_OSS_Access_Key}
# bucket: 'tingkelai-client'
# endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
# prefix: 'pc-autoupdate/mac/release'
# fileReplace:
# - dist: 'package-release/release-mac.yml' # 资源所在目录 或者 文件路径
# target: 'release-mac.yml'
# upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
# - type: 'aliyunOss'
# param:
# accessKeyId: ${ALY_OSS_Access_Id}
# secretAccessKey: ${ALY_OSS_Access_Key}
# bucket: 'tingkelai-client'
# endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
# prefix: 'pc-autoupdate/mac/release'
# - dist: 'package-release/release-mac.json'
# target: 'release-mac.json'
# upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
# - type: 'aliyunOss'
# param:
# accessKeyId: ${ALY_OSS_Access_Id}
# secretAccessKey: ${ALY_OSS_Access_Key}
# bucket: 'tingkelai-client'
# endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
# prefix: 'pc-autoupdate/mac/release'
mac-release:
build:
- 'npm run build-mac-release'
convert:
target: package-release/release-mac.yml
dest: package-release/release-mac.json
resource:
- dist: 'package-release' # 资源所在目录 或者 文件路径
ignore:
- 'mac'
- '/.yml$/'
- '/.json/'
- '/.blockmap$/'
upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
- type: 'aliyunOss'
param:
accessKeyId: ${ALY_OSS_Access_Id}
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'tingkelai-client'
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/mac/release'
fileReplace:
- dist: 'package-release/release-mac.yml' # 资源所在目录 或者 文件路径
target: 'release-mac.yml'
upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
- type: 'aliyunOss'
param:
accessKeyId: ${ALY_OSS_Access_Id}
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'tingkelai-client'
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/mac/release'
- dist: 'package-release/release-mac.json'
target: 'release-mac.json'
upload: # 以下指定上传资源文件要用的方式,如果指定多个,会依次使用上传
- type: 'aliyunOss'
param:
accessKeyId: ${ALY_OSS_Access_Id}
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'tingkelai-client'
endpoint: 'http://oss-cn-hangzhou.aliyuncs.com'
prefix: 'pc-autoupdate/mac/release'
23 changes: 13 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
matrix:
include:
# - os: osx
# osx_image: xcode10.2
# language: node_js
# node_js: "10"

language: node_js
node_js: "10"

jobs:
include:
- os: osx
osx_image: xcode10.2
script:
- chmod 777 travis_mac.sh
- ./travis_mac.sh
- os: windows
language: node_js
node_js: "10"
script: ./travis_win.sh

env:
global:
Expand All @@ -27,10 +30,10 @@ install:
script:
# - echo GH_TOKEN
# - npm run deploy
- ./travis.sh
# - ./travis.sh

branches:
only:
- /^master-deploy-.*$/ # 正式版的发布
- /^check-deploy-.*$/ # 用于审核的tag
- /^beta-deploy-.*$/ # 本地测试
- /^beta-deploy-.*$/ # 本地测试
16 changes: 12 additions & 4 deletions electron-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ builder.build({
},
mac: {
category: 'public.app-category.productivity', //放到生产效率类
icon: 'res/app.icns',
type: 'distribution'
icon: 'src/assets/tkl.ico',
type: 'distribution',
target: ['dmg']
},
dmg: {
artifactName: 'tingkelai-mac-${env.CHANNEL}-${version}.${ext}',
background: 'src/assets/dmg-bg.png',
title: 'tingkelai ${version}',
contents: [
{
Expand All @@ -44,7 +46,11 @@ builder.build({
type: 'link',
path: '/Applications'
}
]
],
window: {
width: 540,
height: 380,
}
},
win: {
target: [
Expand All @@ -53,6 +59,8 @@ builder.build({
arch: [process.env.ARCH]
}
],
// certificateSubjectName: '南京听客来信息技术有限公司',
// certificateSha1: 'C62F13BAC984C857370B22DB8550B58002180D81',
icon: 'src/assets/tkl.ico',
publish: {
provider: 'generic',
Expand All @@ -72,7 +80,7 @@ builder.build({
createStartMenuShortcut: true,
allowToChangeInstallationDirectory: true,
oneClick: false,
perMachine: false
perMachine: true // 与 oneClick 组合使用,出现不同的安装情况
},
}
});
Loading

0 comments on commit 6eb2035

Please sign in to comment.