Skip to content

Commit

Permalink
chore: cleanup package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilb committed Sep 23, 2024
1 parent 9260d92 commit 29a99d4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 44 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
# macos-14 is disabled for now as we hit our free tier limit for macos builds
os: [windows-2022, ubuntu-20.04, macos-12]
env:
SIGNAL_ENV: production
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: git config --global core.autocrlf false
Expand Down
6 changes: 3 additions & 3 deletions actions/build_no_publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ runs:
- name: Build windows production binaries
shell: bash
if: runner.os == 'Windows'
run: $(yarn bin)/electron-builder --config.extraMetadata.environment=%SIGNAL_ENV% --publish=never --config.directories.output=release
run: yarn build-release

- name: Build mac production binaries
shell: bash
if: runner.os == 'macOS'
run: |
source ./build/setup-mac-certificate.sh
$(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion=${{ github.ref }} --publish=never --config.directories.output=release
yarn build-release --config.mac.bundleVersion=${{ github.ref }}
env:
MAC_CERTIFICATE: ${{ inputs.MAC_CERTIFICATE }}
MAC_CERTIFICATE_PASSWORD: ${{ inputs.MAC_CERTIFICATE_PASSWORD }}
Expand All @@ -43,7 +43,7 @@ runs:
if: runner.os == 'Linux'
run: |
sudo apt-get install -y rpm
yarn build-release
yarn sedtoDeb; yarn build-release && yarn sedtoAppImage && yarn build-release && yarn sedtoDeb
- name: Remove unpacked files
run: |
Expand Down
8 changes: 5 additions & 3 deletions actions/build_publish/action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
name: 'Build & Publish'
description: 'Build & Publish'

runs:
using: 'composite'

steps:
- name: Build & publish windows production binaries
shell: bash
if: runner.os == 'Windows' && github.ref == 'master' && github.event_name == 'push'
run: $(yarn bin)/electron-builder --config.extraMetadata.environment=%SIGNAL_ENV% --publish=always
run: $(yarn bin)/electron-builder --config.extraMetadata.environment=production --publish=always

- name: Build & publish mac production binaries
shell: bash
if: runner.os == 'macOS' && github.ref == 'master' && github.event_name == 'push'
run: |
source ./build/setup-mac-certificate.sh
$(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion=${{ github.ref }} --publish=always
$(yarn bin)/electron-builder --config.extraMetadata.environment=production --config.mac.bundleVersion=${{ github.ref }} --publish=always
env:
MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }}
MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
Expand All @@ -26,4 +28,4 @@ runs:
if: runner.os == 'Linux' && github.ref == 'master' && github.event_name == 'push'
run: |
sudo apt-get install -y rpm
yarn build-release-publish
yarn sedtoDeb; yarn build-release-publish && yarn sedtoAppImage && yarn build-release-publish && yarn sedtoDeb
2 changes: 1 addition & 1 deletion build/updateLocalConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var _ = require('lodash');
var execSync = require('child_process').execSync;

const updateLocalConfig = () => {
var environment = process.env.SIGNAL_ENV || 'production';
var environment = 'production';
var configPath = `config/local-${environment}.json`;
var localConfig;

Expand Down
19 changes: 5 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,9 @@
"format-full": "prettier --list-different --write \"*.{css,js,json,scss,ts,tsx}\" \"./**/*.{css,js,json,scss,ts,tsx}\"",
"start-prod-test": "cross-env NODE_ENV=production NODE_APP_INSTANCE=$MULTI electron .",
"test": "mocha",
"build-release": "run-script-os",
"build-release-non-linux": "yarn build-everything && cross-env SIGNAL_ENV=production electron-builder --config.extraMetadata.environment=production --publish=never --config.directories.output=release",
"build-release:win32": "yarn build-release-non-linux",
"build-release:macos": "yarn build-release-non-linux",
"build-release:linux": "yarn sedtoDeb; yarn build-release-non-linux && yarn sedtoAppImage && yarn build-release-non-linux && yarn sedtoDeb",
"build-release-publish": "run-script-os",
"build-release-publish-non-linux": "yarn build-everything && cross-env SIGNAL_ENV=production $(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --publish=always",
"build-release-publish:win32": "yarn build-release-publish-non-linux",
"build-release-publish:macos": "yarn build-release-publish-non-linux",
"build-release-publish:linux": "yarn sedtoDeb; yarn build-release-publish-non-linux && yarn sedtoAppImage && yarn build-release-publish-non-linux && yarn sedtoDeb",
"appImage": "yarn sedtoAppImage; yarn build-release-non-linux; yarn sedtoDeb",
"build-release-base": "cross-env NODE_ENV=production electron-builder --config.extraMetadata.environment=production",
"build-release": "yarn build-release-base --publish=never --config.directories.output=release",
"build-release-publish": "yarn build-release-base --publish=always",
"sedtoAppImage": "sed -i 's/\"target\": \\[\"deb\", \"rpm\", \"freebsd\"\\]/\"target\": \"AppImage\"/g' package.json",
"sedtoDeb": "sed -i 's/\"target\": \"AppImage\"/\"target\": \\[\"deb\", \"rpm\", \"freebsd\"\\]/g' package.json",
"ready": "yarn dedup-yarn-lock --fail && yarn build-everything && yarn lint-full && yarn test",
Expand Down Expand Up @@ -207,7 +199,6 @@
"postinstall-prepare": "^1.0.1",
"prettier": "3.2.5",
"protobufjs-cli": "^1.1.1",
"run-script-os": "^1.1.6",
"sass": "^1.60.0",
"sass-loader": "^13.2.2",
"sinon": "9.0.2",
Expand Down Expand Up @@ -294,8 +285,8 @@
"files": [
"package.json",
"config/default.json",
"config/${env.SIGNAL_ENV}.json",
"config/local-${env.SIGNAL_ENV}.json",
"config/${env.production}.json",
"config/local-${env.production}.json",
"background.html",
"about.html",
"password.html",
Expand Down
22 changes: 0 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -765,13 +765,6 @@
resolved "https://registry.yarnpkg.com/@types/filesize/-/filesize-3.6.0.tgz#5f1a25c7b4e3d5ee2bc63133d374d096b7008c8d"
integrity sha512-rOWxCKMjt2DBuwddUnl5GOpf/jAkkqteB+XldncpVxVX+HPTmK2c5ACMOVEbp9gaH81IlhTdC3TwvRa5nopasw==

"@types/firstline@^2.0.2":
version "2.0.4"
resolved "https://registry.yarnpkg.com/@types/firstline/-/firstline-2.0.4.tgz#b8d3f8f7396d1589efea89db183c047a42efaf04"
integrity sha512-EYoMzk783ncj3soLGADXD/rklDMw1PAO5Hc3lRZa5G21vkfacwkdTlIdhTJ39omqDLezTSmxjDG1psd4A/mUHg==
dependencies:
"@types/node" "*"

"@types/fs-extra@5.0.5":
version "5.0.5"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.5.tgz#080d90a792f3fa2c5559eb44bd8ef840aae9104b"
Expand Down Expand Up @@ -3674,11 +3667,6 @@ find-yarn-workspace-root@^2.0.0:
dependencies:
micromatch "^4.0.2"

firstline@1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/firstline/-/firstline-1.2.1.tgz#b88673c42009f8821fac2926e99720acee924fae"
integrity sha512-6eMQNJtDzyXSC1yeCBWspqA6LeV5la2XHGTXQq4O0xkglAutpyny/sB+zVdXTZ9nzcDW9ZGLxwXXkB+ZEtJuPw==

flat-cache@^3.0.4:
version "3.2.0"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee"
Expand Down Expand Up @@ -6381,11 +6369,6 @@ read-config-file@6.2.0:
json5 "^2.2.0"
lazy-val "^1.0.4"

read-last-lines-ts@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/read-last-lines-ts/-/read-last-lines-ts-1.2.1.tgz#99e46288c5373c06e16e90e666a46b595dad80a1"
integrity sha512-1VcCrAU38DILYiF4sbNY13zdrMGwrFqjGQnXJy28G1zLJItvnWtgCbqoAJlnZZSiEICMKdM4Ol7LYvVMEoKrAg==

read-pkg-up@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507"
Expand Down Expand Up @@ -6695,11 +6678,6 @@ run-parallel@^1.1.9:
dependencies:
queue-microtask "^1.2.2"

run-script-os@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/run-script-os/-/run-script-os-1.1.6.tgz#8b0177fb1b54c99a670f95c7fdc54f18b9c72347"
integrity sha512-ql6P2LzhBTTDfzKts+Qo4H94VUKpxKDFz6QxxwaUZN0mwvi7L3lpOI7BqPCq7lgDh3XLl0dpeXwfcVIitlrYrw==

safe-array-concat@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb"
Expand Down

0 comments on commit 29a99d4

Please sign in to comment.