Commit 909cbe23 authored by 神楽坂玲奈's avatar 神楽坂玲奈

ci

parent d2999c75
......@@ -2,18 +2,44 @@ variables:
GIT_DEPTH: "1"
stages:
- prepare
- build
- deploy
macOS_bin:
stage: prepare
tags:
- linux
artifacts:
paths:
- bin
script:
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/mycard-mat/mycard-mat-macos.tar.gz | tar zxf -
windows_bin:
stage: prepare
tags:
- linux
artifacts:
paths:
- bin
script:
- wget -O - https://cdn01.moecube.com/ygopro-build-materials/mycard-mat/mycard-mat-windows.tar.gz | tar zxf -
windows:
image: chocolateyfest/node
stage: build
dependencies:
- windows_bin
tags:
- windows
variables:
CSC_KEY_PASSWORD: $WINDOWS_CSC_KEY_PASSWORD
CSC_LINK: $WINDOWS_CSC_LINK
script:
- npm ci
- npm run build
- dir dist
- npm run dist
artifacts:
paths:
- dist/mycard-*
......@@ -26,7 +52,7 @@ linux:
script:
- npm ci
- npm run build
- ls dist
- npm run dist
artifacts:
paths:
- dist/mycard-*
......@@ -35,10 +61,16 @@ macOS:
stage: build
tags:
- macOS
variables:
CSC_KEY_PASSWORD: $MACOS_CSC_KEY_PASSWORD
CSC_LINK: $MACOS_CSC_LINK
APPLE_ID: $MACOS_NOTARIZE_USERNAME
APPLE_ID_PASSWORD: $MACOS_NOTARIZE_PASSWORD
TEAM_SHORT_NAME: $MACOS_ASC_PROVIDER
script:
- npm ci
- npm run build
- ls dist
- npm run dist
artifacts:
paths:
- dist/mycard-*
......@@ -46,12 +78,14 @@ macOS:
upload_to_minio:
stage: deploy
dependencies:
- macOS
- windows
- linux
tags:
- linux
image: python
image: bitnami/aws-cli
script:
- pip install -U -i https://mirrors.aliyun.com/pypi/simple/ awscli
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync dist/ s3://mycard/mycard-ci-test
only:
- tags
- ci-test
# only:
# - tags
......@@ -2,22 +2,16 @@ const raw = require('raw-socket');
const socket = raw.createSocket({ protocol: raw.Protocol.UDP });
const handler = {
connect(local_port, remote_port, remote_address) {
let buffer = Buffer.alloc(9);
const buffer = Buffer.alloc(9);
buffer.writeUInt16BE(local_port, 0);
buffer.writeUInt16BE(remote_port, 2);
buffer.writeUInt16BE(buffer.length, 4);
socket.send(buffer, 0, buffer.length, remote_address, (error, bytes) => {
if (error) {
throw error;
}
});
socket.send(buffer, 0, buffer.length, remote_address, () => {});
},
};
process.on('message', (message) => {
handler[message.action](...message.arguments);
});
process.on('disconnect', process.exit);
process.send('initialized');
......@@ -79,6 +79,7 @@
"asar": false,
"files": [
"main.js",
"maotama.js",
"dist/mycard"
],
"extraResources": [
......
......@@ -34,7 +34,7 @@ let data_str = data_url.get('data');
// "arena_rank_ex":"335",
// }
let data = JSON.parse(data_str!);
let data = JSON.parse(data_str);
let titleStr;
let icon = 'https://ygobbs.com/user_avatar/ygobbs.com/' + data.myname + '/120/1.png';
let myMame = data.myname;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment