From 14c0236107ce40f805bc8faa795b12a74c582060 Mon Sep 17 00:00:00 2001 From: Elytherion Date: Tue, 20 Aug 2019 11:16:31 +0200 Subject: [PATCH] Update some CD logic, still parts missing though --- .travis.yml | 48 +++++++++++++++++++++++++++-------------------- README.md | 2 +- build.js | 8 +++++--- buildInsider.js | 8 +++++--- package-lock.json | 6 ++++++ package.json | 17 +++++++++-------- 6 files changed, 54 insertions(+), 35 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c5430e4..aff2e8b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,32 @@ language: node_js node_js: - - node - +- node jobs: include: - - stage: "Test" - script: npm test - - stage: "Build" - name: "Build OS X" - if: tag IS present - os: osx - script: npm run build:osx - - name: "Build Linux" - if: tag IS present - os: linux - script: npm run build:linux - - name: "Build Windows" - if: tag IS present - os: win - script: npm run build:win - - stage: "Deploy" - if: tag IS present - script: skip + - stage: Test + script: npm test + - stage: Build & Deploy + name: Build OS X + if: tag IS present && branch = master + os: osx + script: npm run compile && npm run release:osx + - name: Build OS X Insider + if: tag IS present && branch != master + os: osx + script: npm run compile && npm run prerelease:osx + - name: Build Linux + if: tag IS present && branch = master + os: linux + script: npm run compile && npm run release:linux + - name: Build Linux Insider + if: tag IS present && branch != master + os: linux + script: npm run compile && npm run prerelease:linux + - name: Build Windows + if: tag IS present && branch = master + os: win + script: npm run compile && npm run release:win + - name: Build Windows Insider + if: tag IS present && branch != master + os: win + script: npm run compile && npm run prerelease:win diff --git a/README.md b/README.md index 6ff94e44..2bf1e3ce 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Optolith Character Generator +# Optolith Character Generator and Manager [![Build Status](https://travis-ci.com/elyukai/optolith-client.svg?branch=develop)](https://travis-ci.com/elyukai/optolith-client) This is the repository for Optolith, a desktop application for The Dark Eye 5th Edition. diff --git a/build.js b/build.js index f611183d..4eb32312 100644 --- a/build.js +++ b/build.js @@ -2,8 +2,6 @@ const builder = require ("electron-builder") const { copyTables } = require ("./copyTables") -// @ts-ignore -const { stable } = require ("./publishSettings.json") module.exports = { buildWindows: @@ -99,5 +97,9 @@ const config = { target: "default", artifactName: "Optolith_${version}.${ext}" }, - publish: stable, + publish: { + "provider": "generic", + "url": process.env.PUBLISH_URL_INSIDER, + "channel": "latest" + }, } diff --git a/buildInsider.js b/buildInsider.js index 951845d4..58c4d0d2 100644 --- a/buildInsider.js +++ b/buildInsider.js @@ -1,8 +1,6 @@ // @ts-check const builder = require ("electron-builder") -// @ts-ignore -const { insider } = require ("./publishSettings.json") module.exports = { buildWindows: @@ -96,5 +94,9 @@ const config = { target: "default", artifactName: "OptolithInsider_${version}.${ext}" }, - publish: insider, + publish: { + "provider": "generic", + "url": process.env.PUBLISH_URL, + "channel": "latest" + }, } diff --git a/package-lock.json b/package-lock.json index d7739be1..c136b094 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1283,6 +1283,12 @@ } } }, + "basic-ftp": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-3.8.1.tgz", + "integrity": "sha512-w4vAJLCB7MwA6I3g2VSulNk4GqtAtRZLnDbUTDdQ8VM5a990Kh4Wmq+N1IJP5XZ5yws0EAU52G6FwAuDwhrKpw==", + "dev": true + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", diff --git a/package.json b/package.json index 828885c8..0d4bbb46 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "name": "Lukas Obermann", "email": "support@optolith.app" }, - "homepage": "https://github.com/Elytherion/tdeheroes", + "homepage": "https://github.com/Elytherion/optolith-client", "license": "MPL-2.0", "main": "app/main.js", "dependencies": { @@ -44,6 +44,7 @@ "@types/react-redux": "7.0.8", "@types/semver": "6.0.0", "@types/styled-components": "4.1.15", + "basic-ftp": "3.8.1", "electron": "6.0.1", "electron-builder": "21.2.0", "eslint": "4.19.1", @@ -62,12 +63,12 @@ "typescript-tslint-plugin": "0.3.1" }, "scripts": { - "buildInsiderWin": "node ./buildInsiderWin.js", - "buildInsiderLinux": "node ./buildInsiderLinux.js", - "buildInsiderMac": "node ./buildInsiderMac.js", - "build:win": "node ./buildWin.js", - "build:linux": "node ./buildLinux.js", - "build:osx": "node ./buildMac.js", + "prerelease:win": "PUBLISH_URL=$PUBLISH_URL_INSIDER node ./buildInsiderWin.js", + "prerelease:linux": "PUBLISH_URL=$PUBLISH_URL_INSIDER node ./buildInsiderLinux.js", + "prerelease:mac": "PUBLISH_URL=$PUBLISH_URL_INSIDER node ./buildInsiderMac.js", + "release:win": "PUBLISH_URL=$PUBLISH_URL node ./buildWin.js", + "release:linux": "PUBLISH_URL=$PUBLISH_URL node ./buildLinux.js", + "release:osx": "PUBLISH_URL=$PUBLISH_URL node ./buildMac.js", "buildCss": "node --experimental-modules buildSass.mjs", "copyTables": "node ./copyTablesOnly.js", "copyTablesInsider": "node ./copyTablesInsiderOnly.js", @@ -78,7 +79,7 @@ "test": "jest", "circ": "madge -c ./src" }, - "repository": {}, + "repository": "github:elyukai/optolith-client", "jest": { "transform": { "^.+\\.tsx?$": "ts-jest"