From 13bc185829a5e940ba2616b141f159e116362bb1 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 4 Feb 2018 17:51:42 +0000 Subject: [PATCH] Improved Android and Electron release process --- Tools/release-electron.js | 3 --- Tools/tool-utils.js | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/release-electron.js b/Tools/release-electron.js index e6acf13b39..c4d6965ae8 100644 --- a/Tools/release-electron.js +++ b/Tools/release-electron.js @@ -1,8 +1,5 @@ -const fs = require('fs-extra'); const { execCommand, githubRelease, handleCommitHook, githubOauthToken } = require('./tool-utils.js'); const path = require('path'); -const fetch = require('node-fetch'); -const uriTemplate = require('uri-template'); const rootDir = path.dirname(__dirname); const appDir = rootDir + '/ElectronClient/app'; diff --git a/Tools/tool-utils.js b/Tools/tool-utils.js index c32a085be8..6c59cffc1a 100644 --- a/Tools/tool-utils.js +++ b/Tools/tool-utils.js @@ -82,11 +82,14 @@ toolUtils.fileExists = async function(filePath) { } toolUtils.githubOauthToken = async function() { + const fs = require('fs-extra'); const r = await fs.readFile(__dirname + '/Tools/github_oauth_token.txt'); return r.toString(); } toolUtils.githubRelease = async function(tagName, isDraft) { + const fetch = require('node-fetch'); + const oauthToken = await githubOauthToken(); const response = await fetch('https://api.github.com/repos/laurent22/joplin/releases', {