1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-06-24 21:25:23 +00:00

Additional fixes

This commit is contained in:
Michael Hollister 2024-10-21 13:37:15 -05:00
parent a0452b424d
commit 736b0c9fdc
4 changed files with 15 additions and 5 deletions

View file

@ -3,7 +3,7 @@ const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const { exec } = require('child_process');
const path = require('path');
const extract = require('extract-zip')
// const extract = require('extract-zip')
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
@ -16,6 +16,7 @@ module.exports = {
packagerConfig: {
asar: true,
icon: './assets/icons/icon',
// TODO: Windows signing
osxSign: {},
osxNotarize: {
appleApiKey: process.env.FCAST_APPLE_API_KEY,

View file

@ -1,12 +1,12 @@
{
"name": "fcast-receiver",
"version": "1.0.14",
"version": "2.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "fcast-receiver",
"version": "1.0.14",
"version": "2.0.0",
"license": "MIT",
"dependencies": {
"bufferutil": "^4.0.8",
@ -39,7 +39,6 @@
"@types/yargs": "^17.0.33",
"electron": "^32.2.1",
"eslint": "^9.10.0",
"extract-zip": "^2.0.1",
"globals": "^15.9.0",
"jest": "^29.7.0",
"mdns-js": "github:mdns-js/node-mdns-js",

View file

@ -32,7 +32,6 @@
"@types/yargs": "^17.0.33",
"electron": "^32.2.1",
"eslint": "^9.10.0",
"extract-zip": "^2.0.1",
"globals": "^15.9.0",
"jest": "^29.7.0",
"mdns-js": "github:mdns-js/node-mdns-js",

View file

@ -49,6 +49,7 @@ list_response = s3.list_objects_v2(Bucket=BUCKET_NAME, Prefix='electron/')
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 = bucket_versions_full if CACHE_VERSION_AMOUNT < 0 else bucket_versions_full[:CACHE_VERSION_AMOUNT]
os.makedirs(TEMP_DIR, exist_ok=True)
# 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
version = os.listdir('/artifacts/zip/linux/x64')[0].split('-')[2]
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*'))
# Clean up old job artifacts
shutil.rmtree('/artifacts')
os.makedirs('/artifacts', exist_ok=True)
return version
def sync_local_cache():
@ -88,6 +95,8 @@ def sync_local_cache():
def upload_local_cache():
print('Uploading local cache to s3...')
shutil.copytree(TEMP_DIR, os.path.join(LOCAL_CACHE_DIR, 'electron'), dirs_exist_ok=True)
local_files = []
for root, _, files in os.walk(LOCAL_CACHE_DIR):
for filename in files:
@ -121,3 +130,5 @@ sync_local_cache()
upload_local_cache()
# generate_previous_releases_page()
# update_website()
shutil.rmtree(TEMP_DIR)