Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ jobs:
name: Deploy and alias Hyperion
command: npx now-cd --alias "alpha=hyperion.alpha.spectrum.chat" --team spaceprogram

deploy_desktop:
<<: *js_defaults
docker:
- image: circleci/node:8
steps:
- attach_workspace:
at: ~/spectrum
- run:
name: Build and release desktop app
command: yarn run release:desktop

# Run eslint, flow etc.
test_static_js:
Expand Down Expand Up @@ -212,3 +222,10 @@ workflows:
filters:
branches:
only: alpha
- deploy_desktop:
requires:
- test_static_js
- test_web
filters:
branches:
only: production
12 changes: 4 additions & 8 deletions desktop/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# Desktop

**This folder contains all sources used to build spectrum desktop application.**

The project uses [Electron](https://electronjs.org/) to build cross platform desktop apps with JavaScript, HTML, and CSS.
This folder contains the [Electron](https://electronjs.org/)-based desktop app for Spectrum. Electron renders a web view, which renders the main `Spectrum.chat` webpage.

## Directory Structure

* `release/` - the release build for each platform (mac, win, linux).
* `resources/` - the resources folder (icons, images ...).
* `src/` the source code of electron application.
* `package.json` - dependencies & devdependencies.
* `yarn.lock` - Yarn lockfile to get consistent installs across machine.
* `release/` - the release build for each platform (mac, win, linux)
* `resources/` - the resources folder (icons, images ...)
* `src/` the source code of electron application

## Scripts

Expand Down
23 changes: 15 additions & 8 deletions desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"name": "Space Program Inc.",
"email": "hey@spectrum.chat"
},
"version": "1.0.0",
"repository": "https://github.com/withspectrum/spectrum",
"version": "1.0.0-beta.1",
"main": "src/main.js",
"private": true,
"dependencies": {
Expand All @@ -16,21 +17,27 @@
},
"devDependencies": {
"electron": "^1.8.4",
"electron-builder": "^20.8.1"
"electron-builder": "^20.8.1",
"rimraf": "^2.6.2"
},
"scripts": {
"dev": "electron ./src/main.js",
"package": "build --dir",
"package:mac": "build --mac",
"package:linux": "build --linux",
"package:win": "build --win --x64",
"package:all": "build -mwl",
"ship": "build -p always"
"prepackage": "rimraf release",
"package": "build",
"package:mac": "yarn run package --mac",
"package:linux": "yarn run package --linux",
"package:win": "yarn run package --win --x64",
"package:all": "yarn run package -mwl",
"release": "yarn run package:all --publish always"
},
"build": {
"productName": "Spectrum",
"appId": "chat.spectrum",
"copyright": "Copyright © 2018 Space Program Inc.",
"publish": "github",
"releaseInfo": {
"releaseName": "${name} Desktop App v${version}"
},
"files": [
"src/**/*",
"node_modules/**/*",
Expand Down
12 changes: 12 additions & 0 deletions desktop/resources/release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- PUT MORE INFO ABOUT CHANGES IN THIS RELEASE HERE -->


<!-- NOTE: LEAVE THE BELOW TEXT ALONE -->
----
- **If you've already downloaded the app you don't need to download it again!** You will automatically get prompted to upgrade to new versions
- If you're installing the app for the first time, download the right file for your operating system and execute it:
- MacOS: `Spectrum-{version}-mac.zip`
- Windows: `Spectrum-{version}.exe`
- Linux: `Spectrum-{version}_amd64.deb` or `Spectrum-{version}-x86_64.AppImage`

Enjoy!
2 changes: 1 addition & 1 deletion desktop/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ require-main-filename@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"

rimraf@^2.2.8:
rimraf@^2.2.8, rimraf@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
dependencies:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
"postbuild:hyperion": "cp now.json build-hyperion/now.json",
"build:web": "cross-env NODE_PATH=./ react-app-rewired build",
"build:desktop": "(cd desktop && yarn run package:all)",
"release:desktop": "(cd desktop && yarn run release)",
"jest": "cross-env NODE_PATH=./ jest",
"test": "npm run jest -- --runInBand --watch",
"test:ci": "npm run jest -- --forceExit --outputFile test-results.json --json --maxWorkers=2",
Expand Down