Skip to content

Commit

Permalink
now: fix automated mainnet nightly, upgrade to zero config settings (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sohkai authored Jan 18, 2020
1 parent 5dcb3d4 commit c2178da
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
1 change: 1 addition & 0 deletions .nowignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock.json
8 changes: 5 additions & 3 deletions now-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"public": true,
"scope": "aragon",
"alias": "nightly.aragon.org",
"builds": [
{ "src": "package.json", "use": "@now/static-build", "config": { "distDir": "build" } }
]
"build": {
"env": {
"ARAGON_ETH_NETWORK_TYPE": "main"
}
}
}
3 changes: 0 additions & 3 deletions now.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"public": true,
"scope": "aragon",
"alias": "nightly-rinkeby.aragon.org",
"builds": [
{ "src": "package.json", "use": "@now/static-build", "config": { "distDir": "build/rinkeby" } }
],
"github": {
"silent": true
}
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@
"lint": "eslint ./src",
"test": "npm run lint && npm run jest",
"jest": "jest",
"now-build": "npm run build:mainnet -- build && npm run build -- build/rinkeby",
"publish:major": "node scripts/publish major --only-content --files build/",
"publish:minor": "node scripts/publish minor --only-content --files build/",
"publish:patch": "node scripts/publish patch --only-content --files build/",
"publish:major": "node scripts/publish major --only-content --files public/",
"publish:minor": "node scripts/publish minor --only-content --files public/",
"publish:patch": "node scripts/publish patch --only-content --files public/",
"publish:mainnet:major": "npm run publish:major -- --environment mainnet --build-script build:mainnet",
"publish:mainnet:minor": "npm run publish:minor -- --environment mainnet --build-script build:mainnet",
"publish:mainnet:patch": "npm run publish:patch -- --environment mainnet --build-script build:mainnet",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const version = require('../package.json').version
const execute = require('child_process').execSync

// First two arguments are node and script name
const buildDir = process.argv[2] || 'build'
const buildDir = process.argv[2] || 'public'

execute(`rimraf ${buildDir}`, { stdio: 'inherit' })
execute(`copy-aragon-ui-assets -n aragon-ui ./${buildDir}`, {
Expand Down
6 changes: 3 additions & 3 deletions scripts/build-local
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const {
DEFAULT_LOCAL_IPFS_GATEWAY,
} = require('./config/local')

execute('rimraf ./build', { stdio: 'inherit' })
execute(`copy-aragon-ui-assets -n aragon-ui ./build`, {
execute('rimraf ./public', { stdio: 'inherit' })
execute(`copy-aragon-ui-assets -n aragon-ui ./public`, {
stdio: 'inherit',
})

Expand All @@ -19,6 +19,6 @@ process.env.ARAGON_IPFS_GATEWAY = DEFAULT_LOCAL_IPFS_GATEWAY
process.env.ARAGON_APP_LOCATOR = 'ipfs'

execute(
`parcel build src/index.html --out-dir ./build --public-url ./ --no-cache`,
`parcel build src/index.html --out-dir ./public --public-url ./ --no-cache`,
{ stdio: 'inherit' }
)
4 changes: 2 additions & 2 deletions scripts/start
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ const execute = require('child_process').execSync

const clientPort = process.env.ARAGON_PORT || process.env.REACT_APP_PORT || 3000

execute(`copy-aragon-ui-assets -n aragon-ui ./build`, {
execute(`copy-aragon-ui-assets -n aragon-ui ./public`, {
stdio: 'inherit',
})

process.env.ARAGON_PACKAGE_VERSION = version
execute(
`parcel serve src/index.html --port ${clientPort} --out-dir ./build --no-cache`,
`parcel serve src/index.html --port ${clientPort} --out-dir ./public --no-cache`,
{ stdio: 'inherit' }
)

0 comments on commit c2178da

Please sign in to comment.