Skip to content

Commit

Permalink
ci: install setuptools (#396)
Browse files Browse the repository at this point in the history
* ci: install setuptools

* chore: remove dist

* chore: add etherjot in correct location

* chore: update etherjot
  • Loading branch information
Cafe137 authored Dec 6, 2023
1 parent 59d46b1 commit 1088c6a
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 25 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ jobs:
cache: 'npm'
node-version: 18

- uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install setuptools
run: python3 -m pip install setuptools

- name: Install all dependencies
run: npm ci && cd ./ui && npm ci

Expand Down Expand Up @@ -76,6 +83,15 @@ jobs:
cache: 'npm'
node-version: 18

- uses: actions/setup-python@v4
if: matrix.os == 'macos-latest'
with:
python-version: '3.12'

- name: Install setuptools
if: matrix.os == 'macos-latest'
run: python3 -m pip install setuptools

- name: Install all dependencies
run: npm ci && cd ./ui && npm ci

Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
node_modules

# electron
dist/*
!dist/etherjot
dist
build
out

Expand Down
33 changes: 18 additions & 15 deletions devkit.mjs
Original file line number Diff line number Diff line change
@@ -1,48 +1,51 @@
#!/usr/bin/env node

import envPaths from 'env-paths'
import open from 'open'
import open from 'open'

import cpy from 'cpy'
import { readFile, rm } from 'node:fs/promises'
import { join } from 'node:path'
import cpy from 'cpy'

const paths = envPaths('Swarm Desktop', { suffix: '' })
const requestedCommand = process.argv[2]

switch (requestedCommand) {
case 'open:ui':
await openUi()
break;
break
case 'copy:ui':
await copyUi()
break;
await copyEtherjot()
break
case 'purge:data':
await purgeData()
break;
break
case 'purge:logs':
await purgeLogs()
break;
break
default:
throw new Error(`Unknown command "${requestedCommand}"!`)

}

function purgeData () {
return rm(paths.data, {recursive: true, force: true})
function purgeData() {
return rm(paths.data, { recursive: true, force: true })
}

function purgeLogs() {
return rm(paths.log, { recursive: true, force: true })
}

function purgeLogs () {
return rm(paths.log, {recursive: true, force: true})
function copyUi() {
return cpy('.', join('..', '..', 'dist', 'ui'), { cwd: join('ui', 'build') })
}

function copyUi () {
return cpy('.', join('..', '..', 'dist', 'ui'), {cwd: join('ui', 'build')})
function copyEtherjot() {
return cpy('.', join('..', 'dist', 'etherjot'), { cwd: join('.', 'etherjot') })
}

async function openUi () {
const apiKey = await readFile(join(paths.data, 'api-key.txt'), {encoding: 'utf-8'})
async function openUi() {
const apiKey = await readFile(join(paths.data, 'api-key.txt'), { encoding: 'utf-8' })
const url = `http://localhost:3002/?v=${apiKey}#/`

console.log('Opening: ' + url)
Expand Down
3 changes: 0 additions & 3 deletions dist/etherjot/static/js/main.d74a0875.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"files": {
"main.css": "/etherjot/static/css/main.d4b9c69a.css",
"main.js": "/etherjot/static/js/main.d74a0875.js",
"main.js": "/etherjot/static/js/main.c9216a4f.js",
"static/media/index.cjs": "/etherjot/static/media/index.93ef761341cad87ea7f1.cjs",
"static/media/space-grotesk.woff2": "/etherjot/static/media/space-grotesk.28337638d11938e35866.woff2",
"index.html": "/etherjot/index.html",
"main.d4b9c69a.css.map": "/etherjot/static/css/main.d4b9c69a.css.map",
"main.d74a0875.js.map": "/etherjot/static/js/main.d74a0875.js.map"
"main.c9216a4f.js.map": "/etherjot/static/js/main.c9216a4f.js.map"
},
"entrypoints": [
"static/css/main.d4b9c69a.css",
"static/js/main.d74a0875.js"
"static/js/main.c9216a4f.js"
]
}
File renamed without changes.
2 changes: 1 addition & 1 deletion dist/etherjot/index.html → etherjot/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/etherjot/favicon.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/etherjot/logo192.png"/><link rel="manifest" href="/etherjot/manifest.json"/><title>Etherjot</title><script defer="defer" src="/etherjot/static/js/main.d74a0875.js"></script><link href="/etherjot/static/css/main.d4b9c69a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/etherjot/favicon.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/etherjot/logo192.png"/><link rel="manifest" href="/etherjot/manifest.json"/><title>Etherjot</title><script defer="defer" src="/etherjot/static/js/main.c9216a4f.js"></script><link href="/etherjot/static/css/main.d4b9c69a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions etherjot/static/js/main.c9216a4f.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

File renamed without changes

0 comments on commit 1088c6a

Please sign in to comment.