mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-07-24 10:56:59 +00:00
Additional fixes
This commit is contained in:
parent
a0452b424d
commit
736b0c9fdc
4 changed files with 15 additions and 5 deletions
|
@ -3,7 +3,7 @@ const yargs = require('yargs/yargs');
|
||||||
const { hideBin } = require('yargs/helpers');
|
const { hideBin } = require('yargs/helpers');
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const extract = require('extract-zip')
|
// const extract = require('extract-zip')
|
||||||
|
|
||||||
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
|
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
|
||||||
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
|
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
|
||||||
|
@ -16,6 +16,7 @@ module.exports = {
|
||||||
packagerConfig: {
|
packagerConfig: {
|
||||||
asar: true,
|
asar: true,
|
||||||
icon: './assets/icons/icon',
|
icon: './assets/icons/icon',
|
||||||
|
// TODO: Windows signing
|
||||||
osxSign: {},
|
osxSign: {},
|
||||||
osxNotarize: {
|
osxNotarize: {
|
||||||
appleApiKey: process.env.FCAST_APPLE_API_KEY,
|
appleApiKey: process.env.FCAST_APPLE_API_KEY,
|
||||||
|
|
5
receivers/electron/package-lock.json
generated
5
receivers/electron/package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "fcast-receiver",
|
"name": "fcast-receiver",
|
||||||
"version": "1.0.14",
|
"version": "2.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "fcast-receiver",
|
"name": "fcast-receiver",
|
||||||
"version": "1.0.14",
|
"version": "2.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bufferutil": "^4.0.8",
|
"bufferutil": "^4.0.8",
|
||||||
|
@ -39,7 +39,6 @@
|
||||||
"@types/yargs": "^17.0.33",
|
"@types/yargs": "^17.0.33",
|
||||||
"electron": "^32.2.1",
|
"electron": "^32.2.1",
|
||||||
"eslint": "^9.10.0",
|
"eslint": "^9.10.0",
|
||||||
"extract-zip": "^2.0.1",
|
|
||||||
"globals": "^15.9.0",
|
"globals": "^15.9.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"mdns-js": "github:mdns-js/node-mdns-js",
|
"mdns-js": "github:mdns-js/node-mdns-js",
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
"@types/yargs": "^17.0.33",
|
"@types/yargs": "^17.0.33",
|
||||||
"electron": "^32.2.1",
|
"electron": "^32.2.1",
|
||||||
"eslint": "^9.10.0",
|
"eslint": "^9.10.0",
|
||||||
"extract-zip": "^2.0.1",
|
|
||||||
"globals": "^15.9.0",
|
"globals": "^15.9.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"mdns-js": "github:mdns-js/node-mdns-js",
|
"mdns-js": "github:mdns-js/node-mdns-js",
|
||||||
|
|
|
@ -49,6 +49,7 @@ list_response = s3.list_objects_v2(Bucket=BUCKET_NAME, Prefix='electron/')
|
||||||
bucket_files = list_response.get('Contents', [])
|
bucket_files = list_response.get('Contents', [])
|
||||||
bucket_versions_full = sorted(set(map(lambda x: x['Key'].split('/')[1], bucket_files)), key=cmp_to_key(compare_versions), reverse=True)
|
bucket_versions_full = sorted(set(map(lambda x: x['Key'].split('/')[1], bucket_files)), key=cmp_to_key(compare_versions), reverse=True)
|
||||||
bucket_versions = bucket_versions_full if CACHE_VERSION_AMOUNT < 0 else bucket_versions_full[:CACHE_VERSION_AMOUNT]
|
bucket_versions = bucket_versions_full if CACHE_VERSION_AMOUNT < 0 else bucket_versions_full[:CACHE_VERSION_AMOUNT]
|
||||||
|
os.makedirs(TEMP_DIR, exist_ok=True)
|
||||||
|
|
||||||
# CI functions
|
# CI functions
|
||||||
|
|
||||||
|
@ -57,7 +58,13 @@ def copy_artifacts_to_local_cache():
|
||||||
# All artifact should have same version in format: /artifacts/PKG/OS/ARCH/fcast-receiver-VERSION-OS-ARCH.PKG
|
# All artifact should have same version in format: /artifacts/PKG/OS/ARCH/fcast-receiver-VERSION-OS-ARCH.PKG
|
||||||
version = os.listdir('/artifacts/zip/linux/x64')[0].split('-')[2]
|
version = os.listdir('/artifacts/zip/linux/x64')[0].split('-')[2]
|
||||||
dst = os.path.join(TEMP_DIR, version)
|
dst = os.path.join(TEMP_DIR, version)
|
||||||
|
|
||||||
|
print(f'Current app version: {version}')
|
||||||
shutil.copytree('/artifacts', dst, dirs_exist_ok=True, ignore=shutil.ignore_patterns('*.w*'))
|
shutil.copytree('/artifacts', dst, dirs_exist_ok=True, ignore=shutil.ignore_patterns('*.w*'))
|
||||||
|
|
||||||
|
# Clean up old job artifacts
|
||||||
|
shutil.rmtree('/artifacts')
|
||||||
|
os.makedirs('/artifacts', exist_ok=True)
|
||||||
return version
|
return version
|
||||||
|
|
||||||
def sync_local_cache():
|
def sync_local_cache():
|
||||||
|
@ -88,6 +95,8 @@ def sync_local_cache():
|
||||||
|
|
||||||
def upload_local_cache():
|
def upload_local_cache():
|
||||||
print('Uploading local cache to s3...')
|
print('Uploading local cache to s3...')
|
||||||
|
shutil.copytree(TEMP_DIR, os.path.join(LOCAL_CACHE_DIR, 'electron'), dirs_exist_ok=True)
|
||||||
|
|
||||||
local_files = []
|
local_files = []
|
||||||
for root, _, files in os.walk(LOCAL_CACHE_DIR):
|
for root, _, files in os.walk(LOCAL_CACHE_DIR):
|
||||||
for filename in files:
|
for filename in files:
|
||||||
|
@ -121,3 +130,5 @@ sync_local_cache()
|
||||||
upload_local_cache()
|
upload_local_cache()
|
||||||
# generate_previous_releases_page()
|
# generate_previous_releases_page()
|
||||||
# update_website()
|
# update_website()
|
||||||
|
|
||||||
|
shutil.rmtree(TEMP_DIR)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue