Skip to content

Commit

Permalink
chore: Update build configuration
Browse files Browse the repository at this point in the history
- Set compression to 'normal' for macOS builds
- Only publish updates to GitHub in production environment
  • Loading branch information
truemiller committed Sep 29, 2024
1 parent d31bb6a commit 2ac74b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ const main = async () => {
cscKeyPassword: process.env.CSC_KEY_PASSWORD,
cscLink: process.env.CSC_LINK,
mac: {
compression: 'normal',
type: process.env.NODE_ENV === 'production' ? 'distribution' : 'development',
target: [
{
target: 'default', // builds both dmg and zip, required for auto-updates
arch: ['arm64', 'x64'],
},
],
publish: githubPublishOptions,
publish: process.env.NODE_ENV === "production" ? githubPublishOptions : undefined,
category: 'public.app-category.utilities',
icon: 'electron/assets/icons/splash-robot-head-dock.png',
hardenedRuntime: true,
Expand Down
3 changes: 1 addition & 2 deletions electron/components/PearlOTA.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
const { ipcMain } = require('electron');
const { MacUpdater, NsisUpdater } = require('electron-updater');
const os = require('os');
const { logger } = require('../logger');
const { isWindows, isMac, isDev } = require('../constants');
const { isWindows, isMac } = require('../constants');
const { githubUpdateOptions } = require('../constants/config');

/** Over-the-air update manager
Expand Down
4 changes: 3 additions & 1 deletion electron/constants/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { isDev } = require('../constants');

require('dotenv').config();

/**
Expand Down Expand Up @@ -28,7 +30,7 @@ const githubUpdateOptions = {
owner: 'valory-xyz',
repo: 'olas-operate-app',
private: false, // Only set to true if the repo is private
publishAutoUpdate: true,
publishAutoUpdate: !isDev, // Publishes the update to GitHub
channel: 'latest', // The release channel to check for updates, e.g. 'latest', 'beta', 'alpha'
vPrefixedTagName: true,
protocol: 'https',
Expand Down

0 comments on commit 2ac74b8

Please sign in to comment.