-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.js
36 lines (28 loc) · 900 Bytes
/
deploy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { arlogDeploy } from '../arlog/dist/arlogDeploy';
import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const SLASH = path.sep;
const name = 'iframe-wallet';
const CHOSEN_NET = 'DEV_NET'; // AR_LOCAL
const arweaveKeyfileName = {
LOCAL_TEST_NET: `../test-keyfile.json`,
AR_LOCAL: `../test-keyfile.json`,
DEV_NET: `../test-keyfile.json`,
MAIN_NET: `../arweave-keyfile.json`
};
const arweaveKeyfilePath = arweaveKeyfileName[CHOSEN_NET];
const arweaveKeyfile = path.resolve(__dirname, arweaveKeyfilePath);
// arkb does path.join from cwd of arkb/arlog
const buildPath = `../${name}/build/`;
const deployDir = path.resolve(__dirname, buildPath);
(async () => {
await arlogDeploy({
name,
arweaveKeyfile,
deployDir: buildPath,
CHOSEN_NET
});
})();