Skip to content

Commit

Permalink
Merge pull request #95 from bitfinexcom/beta
Browse files Browse the repository at this point in the history
Release version 3.5.0
  • Loading branch information
ezewer authored Jul 14, 2021
2 parents 640ea44 + 41ab2f8 commit f05fa55
Show file tree
Hide file tree
Showing 37 changed files with 1,437 additions and 149 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.linux-builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM electronuserland/builder

ENV NODE_VERSION 12.18.3
ENV NODE_VERSION 14.16.0

COPY ./scripts/install-nodejs.sh ./scripts/install-nodejs.sh

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.mac-builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM electronuserland/builder

ENV NODE_VERSION 12.18.3
ENV NODE_VERSION 14.16.0

COPY ./scripts/install-nodejs.sh ./scripts/install-nodejs.sh

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ui-builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM electronuserland/builder

ENV NODE_VERSION 12.18.3
ENV NODE_VERSION 14.16.0

COPY ./scripts/install-nodejs.sh ./scripts/install-nodejs.sh

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.win-builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM electronuserland/builder:wine

ENV NODE_VERSION 12.18.3
ENV NODE_VERSION 14.16.0

COPY ./scripts/install-nodejs.sh ./scripts/install-nodejs.sh

Expand Down
2 changes: 1 addition & 1 deletion bfx-report-ui
Submodule bfx-report-ui updated 113 files
Binary file not shown.
4 changes: 4 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
dockerfile: Dockerfile.ui-builder
environment:
BRANCH: ${BRANCH}
UI_BUILD_FOLDER: /ui-build
volumes:
- ui-build:/ui-build

Expand All @@ -20,6 +21,7 @@ services:
ELECTRON_CACHE: /root/.cache/electron
ELECTRON_BUILDER_CACHE: /root/.cache/electron-builder
BRANCH: ${BRANCH}
UI_BUILD_FOLDER: /ui-build
volumes:
- ui-build:/ui-build
- ./dist:/dist
Expand All @@ -35,6 +37,7 @@ services:
ELECTRON_CACHE: /root/.cache/electron
ELECTRON_BUILDER_CACHE: /root/.cache/electron-builder
BRANCH: ${BRANCH}
UI_BUILD_FOLDER: /ui-build
volumes:
- ui-build:/ui-build
- ./dist:/dist
Expand All @@ -50,6 +53,7 @@ services:
ELECTRON_CACHE: /root/.cache/electron
ELECTRON_BUILDER_CACHE: /root/.cache/electron-builder
BRANCH: ${BRANCH}
UI_BUILD_FOLDER: /ui-build
volumes:
- ui-build:/ui-build
- ./dist:/dist
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

const { app } = require('electron')

process.traceProcessWarnings = true
app.allowRendererProcessReuse = true

require('./src/error-manager')
.initLogger()

const initializeApp = require('./src/initialize-app')
const makeSingleInstance = require('./src/make-single-instance')

Expand Down
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-report-electron",
"version": "3.4.0",
"version": "3.5.0",
"repository": "https://github.com/bitfinexcom/bfx-report-electron",
"description": "Reporting tool",
"author": "bitfinex.com",
Expand All @@ -11,27 +11,32 @@
"async": "^2.6.1",
"bfx-svc-test-helper": "git+https://github.com/bitfinexcom/bfx-svc-test-helper.git",
"bittorrent-dht": "^8.4.0",
"clean-stack": "^3.0.1",
"cron-validate": "^1.4.2",
"ed25519-supercop": "^2.0.1",
"electron-alert": "^0.1.11",
"electron-alert": "0.1.13",
"electron-log": "^4.3.2",
"electron-root-path": "^1.0.16",
"electron-serve": "^1.0.0",
"electron-updater": "^4.3.8",
"electron-updater": "4.3.8",
"extract-zip": "^2.0.1",
"find-free-port": "^2.0.0",
"grenache-grape": "^0.9.8",
"github-markdown-css": "^4.0.0",
"grenache-grape": "git+https://github.com/bitfinexcom/grenache-grape.git",
"js-yaml": "^4.0.0",
"lodash": "^4.17.15",
"new-github-issue-url": "^0.2.1",
"showdown": "^1.9.1",
"truncate-utf8-bytes": "^1.0.2",
"yauzl": "^2.10.0"
},
"devDependencies": {
"app-builder-bin": "^3.5.13",
"electron": "11.4.5",
"electron-builder": "22.11.1",
"js-yaml": "^4.0.0",
"electron": "13.1.6",
"electron-builder": "22.11.7",
"node-gyp": "7.1.2",
"node-pre-gyp": "^0.11.0",
"standard": "^14.3.1"
"standard": "^16.0.3"
},
"standard": {
"globals": [
Expand Down
14 changes: 10 additions & 4 deletions scripts/build-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
set -x

export CI_ENVIRONMENT_NAME=production
export SKIP_PREFLIGHT_CHECK=true

ROOT="$PWD"
frontendFolder="$ROOT/bfx-report-ui"
pathToTriggerElectronLoad="$frontendFolder/src/utils/triggerElectronLoad.js"
pathToFonts="$frontendFolder/src/styles/fonts"
uiBuildFolder=/ui-build
uiReadyFile="$uiBuildFolder/READY"
uiBuildFolder="$frontendFolder/build"
branch=master

source $ROOT/scripts/update-submodules.sh
Expand All @@ -22,7 +22,13 @@ if [ "$BRANCH" != "" ]
then
branch=$BRANCH
fi
if [ "$UI_BUILD_FOLDER" != "" ]
then
uiBuildFolder=$UI_BUILD_FOLDER
fi

mkdir $uiBuildFolder 2>/dev/null
uiReadyFile="$uiBuildFolder/READY"
rm -rf $uiBuildFolder/*

function usage {
Expand Down Expand Up @@ -89,10 +95,10 @@ sed -i -e \
"s/showFrameworkMode: false/showFrameworkMode: true/g" \
$frontendFolder/src/config.js

rm -f "$ROOT/.eslintrc"

mv -f "$ROOT/.eslintrc" "$ROOT/eslint-conf-disabled-for-ui"
npm i --no-audit
npm run build
mv -f "$ROOT/eslint-conf-disabled-for-ui" "$ROOT/.eslintrc"

if ! [ -s "$frontendFolder/build/index.html" ]; then
exit 1
Expand Down
22 changes: 18 additions & 4 deletions scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ branch=master
dbDriver=better-sqlite
lastCommitFileName=lastCommit.json
isZipReleaseFile="isZipRelease"
bfxStagingUrl="https://api.staging.bitfinex.com"

source $ROOT/scripts/get-conf-value.sh
source $ROOT/scripts/escape-string.sh
Expand Down Expand Up @@ -62,7 +63,13 @@ expressFolder="$frontendFolder/bfx-report-express"
backendFolder="$ROOT/bfx-reports-framework"

linuxLauncherFolder="$ROOT/build/linux-launcher"
uiBuildFolder=/ui-build

uiBuildFolder="$frontendFolder/build"
if [ "$UI_BUILD_FOLDER" != "" ]
then
uiBuildFolder=$UI_BUILD_FOLDER
fi
mkdir $uiBuildFolder 2>/dev/null
uiReadyFile="$uiBuildFolder/READY"

mkdir $ROOT/dist 2>/dev/null
Expand Down Expand Up @@ -96,6 +103,7 @@ cp config/schedule.json.example config/schedule.json
cp config/common.json.example config/common.json
cp config/service.report.json.example config/service.report.json
cp config/facs/grc.config.json.example config/facs/grc.config.json
cp config/facs/grc-slack.config.json.example config/facs/grc-slack.config.json
sed -i -e \
"s/\"syncMode\": false/\"syncMode\": true/g" \
$backendFolder/config/service.report.json
Expand All @@ -104,8 +112,9 @@ sed -i -e \
$backendFolder/config/service.report.json

if [ $isDevEnv != 0 ]; then
escapedBfxStagingUrl=$(escapeString $bfxStagingUrl)
sed -i -e \
"s/\"restUrl\": \".*\"/\"restUrl\": \"https:\/\/test.bitfinex.com\"/g" \
"s/\"restUrl\": \".*\"/\"restUrl\": \"$escapedBfxStagingUrl\"/g" \
$backendFolder/config/service.report.json
fi

Expand Down Expand Up @@ -189,6 +198,11 @@ fi

cd $unpackedFolder

if [ $targetPlatform == "win" ]
then
touch "$isZipReleaseFile"
fi

if [ $targetPlatform == "linux" ]
then
# Build C executable launcher file
Expand Down Expand Up @@ -223,7 +237,7 @@ cd $ROOT

if [ $targetPlatform == "mac" ]
then
node $ROOT/scripts/generate-zipand-blockmap.js
node $ROOT/scripts/node/generate-zipand-blockmap.js
fi

rm -rf /dist/*$targetPlatform*
Expand Down Expand Up @@ -258,4 +272,4 @@ fi

chmod -R a+xwr /dist 2>/dev/null

exit 0
exit 0
File renamed without changes.
9 changes: 0 additions & 9 deletions scripts/reinstall-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,5 @@ rm -f ./package-lock.json
rm -rf ./node_modules
npm i --production --no-audit

if [ $targetPlatform == 'win32' ]
then
betterSqlite3BinPath=$backendFolder/node_modules/better-sqlite3/build/Release
binArch=$ROOT/build/better-sqlite3-prebuild-bin-win/better_sqlite3.zip

rm -rf $betterSqlite3BinPath/better_sqlite3.node
7z x $binArch -o$betterSqlite3BinPath
fi

cd $ROOT
rm -rf "$ROOT/node_modules/ed25519-supercop/build"
6 changes: 1 addition & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ let isMigrationsError = false
throw new WrongPathToUserCsvError()
}

const isRelativePath = pathToUserCsv.startsWith('..')
const pathToCsvFolder = isRelativePath
? path.join(pathToUserCsv, 'csv')
: path.join(pathToUserCsv, 'BitfinexReports')
const defaultPorts = getDefaultPorts()
const {
grape1DhtPort,
Expand Down Expand Up @@ -116,7 +112,7 @@ let isMigrationsError = false
'--isSchedulerEnabled=true',
'--isElectronjsEnv=true',
'--isLoggerDisabled=false',
`--csvFolder=${pathToCsvFolder}`,
`--csvFolder=${pathToUserCsv}`,
`--tempFolder=${pathToUserData}/temp`,
`--logsFolder=${pathToUserData}/logs`,
`--dbFolder=${pathToUserData}`,
Expand Down
Loading

0 comments on commit f05fa55

Please sign in to comment.