Merge branch 'master' into release-1.16

This commit is contained in:
antelle 2020-12-04 16:01:55 +01:00
commit ed3eefbbfc
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
9 changed files with 123 additions and 56 deletions

View File

@ -136,11 +136,16 @@ jobs:
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
- name: Grunt
run: grunt desktop-darwin ${{ github.repository != 'keeweb/keeweb' && '--skip-sign' || '' }}
- name: Upload dmg artifact
- name: Upload x64 dmg artifact
uses: actions/upload-artifact@v1
with:
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.dmg
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.dmg
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.x64.dmg
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.x64.dmg
- name: Upload arm64 dmg artifact
uses: actions/upload-artifact@v1
with:
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.arm64.dmg
path: dist/desktop/KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.arm64.dmg
win32:
runs-on: windows-latest
@ -274,10 +279,15 @@ jobs:
with:
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x86_64.rpm
path: assets
- name: Download darwin.dmg artifact
- name: Download darwin.x64.dmg artifact
uses: actions/download-artifact@v1
with:
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.dmg
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.x64.dmg
path: assets
- name: Download darwin.arm64.dmg artifact
uses: actions/download-artifact@v1
with:
name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.arm64.dmg
path: assets
- name: Download win32.ia32.exe artifact
uses: actions/download-artifact@v1
@ -414,14 +424,23 @@ jobs:
asset_path: assets/KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x86_64.rpm
asset_name: KeeWeb-${{ steps.get_tag.outputs.tag }}.linux.x86_64.rpm
asset_content_type: application/octet-stream
- name: Upload darwin.dmg asset
- name: Upload darwin.x64.dmg asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: assets/KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.dmg
asset_name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.dmg
asset_path: assets/KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.x64.dmg
asset_name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.x64.dmg
asset_content_type: application/octet-stream
- name: Upload darwin.arm64.dmg asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: assets/KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.arm64.dmg
asset_name: KeeWeb-${{ steps.get_tag.outputs.tag }}.mac.arm64.dmg
asset_content_type: application/octet-stream
- name: Upload win32.ia32.exe asset
uses: actions/upload-release-asset@v1

View File

@ -50,6 +50,24 @@ module.exports = function (grunt) {
InternalName: 'KeeWeb'
};
const appdmgOptions = (arch) => ({
title: 'KeeWeb',
icon: 'graphics/icon.icns',
background: 'graphics/dmg-background.png',
'background-color': '#E0E6F9',
'icon-size': 80,
window: { size: { width: 658, height: 498 } },
contents: [
{ x: 438, y: 344, type: 'link', path: '/Applications' },
{
x: 192,
y: 344,
type: 'file',
path: `tmp/desktop/KeeWeb-darwin-${arch}/KeeWeb.app`
}
]
});
grunt.initConfig({
noop: { noop: {} },
clean: {
@ -121,13 +139,19 @@ module.exports = function (grunt) {
dest: 'tmp/desktop/update/',
nonull: true
},
'desktop-darwin-helper': {
'desktop-darwin-helper-x64': {
src: 'helper/darwin/KeeWebHelper',
dest: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Resources/',
nonull: true,
options: { mode: '0755' }
},
'desktop-darwin-installer-helper': {
'desktop-darwin-helper-arm64': {
src: 'helper/darwin/KeeWebHelper',
dest: 'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app/Contents/Resources/',
nonull: true,
options: { mode: '0755' }
},
'desktop-darwin-installer-helper-x64': {
cwd: 'package/osx/KeeWeb Installer.app',
src: '**',
dest:
@ -136,6 +160,15 @@ module.exports = function (grunt) {
nonull: true,
options: { mode: true }
},
'desktop-darwin-installer-helper-arm64': {
cwd: 'package/osx/KeeWeb Installer.app',
src: '**',
dest:
'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app/Contents/Installer/KeeWeb Installer.app',
expand: true,
nonull: true,
options: { mode: true }
},
'desktop-windows-helper-x64': {
src: 'helper/win32/KeeWebHelper.exe',
dest: 'tmp/desktop/KeeWeb-win32-x64/Resources/',
@ -166,11 +199,16 @@ module.exports = function (grunt) {
dest: `dist/desktop/KeeWeb-${pkg.version}.win.arm64.exe`,
nonull: true
},
'native-modules-darwin': {
'native-modules-darwin-x64': {
src: 'node_modules/@keeweb/keeweb-native-modules/*-darwin-x64.node',
dest: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Resources/',
nonull: true
},
'native-modules-darwin-arm64': {
src: 'node_modules/@keeweb/keeweb-native-modules/*-darwin-arm64.node',
dest: 'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app/Contents/Resources/',
nonull: true
},
'native-modules-win32-x64': {
src: 'node_modules/@keeweb/keeweb-native-modules/*-win32-x64.node',
dest: 'tmp/desktop/KeeWeb-win32-x64/resources/',
@ -322,14 +360,24 @@ module.exports = function (grunt) {
options: {
name: 'keeweb',
platform: 'linux',
arch: ['x64'],
arch: 'x64',
icon: 'graphics/icon.ico'
}
},
darwin: {
'darwin-x64': {
options: {
platform: 'darwin',
arch: ['x64'],
arch: 'x64',
icon: 'graphics/icon.icns',
appBundleId: 'net.antelle.keeweb',
appCategoryType: 'public.app-category.productivity',
extendInfo: 'package/osx/extend.plist'
}
},
'darwin-arm64': {
options: {
platform: 'darwin',
arch: 'arm64',
icon: 'graphics/icon.icns',
appBundleId: 'net.antelle.keeweb',
appCategoryType: 'public.app-category.productivity',
@ -430,25 +478,13 @@ module.exports = function (grunt) {
}
},
appdmg: {
options: {
title: 'KeeWeb',
icon: 'graphics/icon.icns',
background: 'graphics/dmg-background.png',
'background-color': '#E0E6F9',
'icon-size': 80,
window: { size: { width: 658, height: 498 } },
contents: [
{ x: 438, y: 344, type: 'link', path: '/Applications' },
{
x: 192,
y: 344,
type: 'file',
path: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app'
}
]
x64: {
options: appdmgOptions('x64'),
dest: `dist/desktop/KeeWeb-${pkg.version}.mac.x64.dmg`
},
app: {
dest: `dist/desktop/KeeWeb-${pkg.version}.mac.dmg`
arm64: {
options: appdmgOptions('arm64'),
dest: `dist/desktop/KeeWeb-${pkg.version}.mac.arm64.dmg`
}
},
nsis: {
@ -591,8 +627,11 @@ module.exports = function (grunt) {
'entitlements-inherit': 'package/osx/entitlements.mac.plist',
'gatekeeper-assess': false
},
desktop: {
'desktop-x64': {
src: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app'
},
'desktop-arm64': {
src: 'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app'
}
},
notarize: {
@ -606,8 +645,11 @@ module.exports = function (grunt) {
return getCodeSignConfig().teamId;
}
},
desktop: {
'desktop-x64': {
src: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app'
},
'desktop-arm64': {
src: 'tmp/desktop/KeeWeb-darwin-arm64/KeeWeb.app'
}
},
'sign-exe': {

View File

@ -51,10 +51,10 @@ module.exports = function(grunt) {
grunt.registerTask('dev-desktop-darwin', 'Build a macOS app in dev environment', [
'default',
'build-desktop-app-content',
'electron:darwin',
'copy:desktop-darwin-helper',
'copy:desktop-darwin-installer-helper',
'copy:native-modules-darwin'
'electron:darwin-x64',
'copy:desktop-darwin-helper-x64',
'copy:desktop-darwin-installer-helper-x64',
'copy:native-modules-darwin-x64'
]);
grunt.registerTask('dev-desktop-win32', 'Build a Windows app in dev environment', [

View File

@ -40,12 +40,18 @@ module.exports = function (grunt) {
]);
grunt.registerTask('build-desktop-executables-darwin', [
'electron:darwin',
'copy:desktop-darwin-helper',
'copy:desktop-darwin-installer-helper',
'copy:native-modules-darwin',
sign ? 'osx-sign:desktop' : 'noop',
sign ? 'notarize:desktop' : 'noop'
'electron:darwin-x64',
'electron:darwin-arm64',
'copy:desktop-darwin-helper-x64',
'copy:desktop-darwin-helper-arm64',
'copy:desktop-darwin-installer-helper-x64',
'copy:desktop-darwin-installer-helper-arm64',
'copy:native-modules-darwin-x64',
'copy:native-modules-darwin-arm64',
sign ? 'osx-sign:desktop-x64' : 'noop',
sign ? 'osx-sign:desktop-arm64' : 'noop',
sign ? 'notarize:desktop-x64' : 'noop',
sign ? 'notarize:desktop-arm64' : 'noop'
]);
grunt.registerTask('build-desktop-executables-win32', [
@ -82,7 +88,7 @@ module.exports = function (grunt) {
'build-desktop-archives-win32'
]);
grunt.registerTask('build-desktop-dist-darwin', ['appdmg']);
grunt.registerTask('build-desktop-dist-darwin', ['appdmg:x64', 'appdmg:arm64']);
grunt.registerTask('build-desktop-dist-win32', [
'nsis:win32-un-x64',

Binary file not shown.

4
package-lock.json generated
View File

@ -1982,8 +1982,8 @@
}
},
"@keeweb/keeweb-native-modules": {
"version": "https://github.com/keeweb/keeweb-native-modules/releases/download/0.4.1/keeweb-native-modules.tgz",
"integrity": "sha512-3cGNjwdSxGGf50DEXHJIOm6/9lBrEh5al+hBwe25nTlWGAnWo4S92vLspGairUI1jew9ewuDgTDfB7+l5t0pFA=="
"version": "https://github.com/keeweb/keeweb-native-modules/releases/download/0.5.3/keeweb-native-modules.tgz",
"integrity": "sha512-kXwHkSrS2uDI+HxLSH/db6P+6Prh1OwnLRYJOK/en295Ao7iCn5dLwdh9jgkhRmCBHmFTVoqPY7CrKWzkyKbOg=="
},
"@sindresorhus/is": {
"version": "0.14.0",

View File

@ -16,7 +16,7 @@
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
"@babel/preset-env": "^7.12.7",
"@fortawesome/fontawesome-free": "^5.15.1",
"@keeweb/keeweb-native-modules": "https://github.com/keeweb/keeweb-native-modules/releases/download/0.4.1/keeweb-native-modules.tgz",
"@keeweb/keeweb-native-modules": "https://github.com/keeweb/keeweb-native-modules/releases/download/0.5.3/keeweb-native-modules.tgz",
"adm-zip": "^0.5.1",
"argon2-browser": "1.15.2",
"autoprefixer": "^10.0.4",

View File

@ -17,11 +17,11 @@ FROM armhf/alpine:latest
MAINTAINER Antelle "antelle.net@gmail.com"
# install nginx
RUN apk add --update bash nginx && \
RUN apk add --no-cache bash nginx && \
mkdir -p /run/nginx/
# install
RUN apk add --update openssl wget unzip ca-certificates
RUN apk add --no-cache openssl wget unzip ca-certificates
# setup nginx
RUN rm -rf /etc/nginx/conf.d/*; \
@ -31,7 +31,7 @@ RUN sed -i 's/access_log.*/access_log \/dev\/stdout;/g' /etc/nginx/nginx.conf; \
sed -i 's/error_log.*/error_log \/dev\/stdout info;/g' /etc/nginx/nginx.conf; \
sed -i 's/error_log \/dev\/stdout info;/error_log \/dev\/stdout info;\n\n# daemon mode off\ndaemon off;/g' /etc/nginx/nginx.conf
ADD keeweb.conf /etc/nginx/conf.d/keeweb.conf
COPY keeweb.conf /etc/nginx/conf.d/keeweb.conf
# clone keeweb
RUN wget https://github.com/keeweb/keeweb/archive/gh-pages.zip; \
@ -46,7 +46,7 @@ RUN wget https://github.com/keeweb/keeweb-plugins/archive/master.zip; \
mv keeweb-plugins-master/docs keeweb/plugins; \
rm -rf keeweb-plugins-master;
ADD entrypoint.sh /opt/entrypoint.sh
COPY entrypoint.sh /opt/entrypoint.sh
RUN chmod a+x /opt/entrypoint.sh
ENTRYPOINT ["/opt/entrypoint.sh"]

View File

@ -17,7 +17,7 @@ FROM nginx:stable
LABEL maintainer="antelle.net@gmail.com"
# install
RUN apt-get -y update && apt-get -y install openssl curl unzip
RUN apt-get -y update && apt-get -y install openssl curl unzip && rm -rf /var/lib/apt/lists/*
# setup nginx
RUN rm -rf /etc/nginx/conf.d/*; \
@ -27,13 +27,13 @@ RUN sed -i 's/access_log.*/access_log \/dev\/stdout;/g' /etc/nginx/nginx.conf; \
sed -i 's/error_log.*/error_log \/dev\/stdout info;/g' /etc/nginx/nginx.conf; \
sed -i 's/^pid/daemon off;\npid/g' /etc/nginx/nginx.conf
ADD keeweb.conf /etc/nginx/conf.d/keeweb.conf
COPY keeweb.conf /etc/nginx/conf.d/keeweb.conf
ADD entrypoint.sh /opt/entrypoint.sh
COPY entrypoint.sh /opt/entrypoint.sh
RUN chmod a+x /opt/entrypoint.sh
# add keeweb files
ADD dist keeweb
COPY dist keeweb
# clone keeweb plugins
RUN curl -Ss -L -O https://github.com/keeweb/keeweb-plugins/archive/master.zip; \