Skip to content

Commit

Permalink
Merge pull request #29 from shankar2105/critical_update
Browse files Browse the repository at this point in the history
Update build script
  • Loading branch information
hitman401 authored May 15, 2017
2 parents 9c35de4 + d72a684 commit a38dd3a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
```bash
$ npm run pack-authenticator
```

To clean the cargo dependencies of Authenticator's native modules add `-- --clean` to above command.
5. Build SAFE Browser and open it.
Expand Down
2 changes: 1 addition & 1 deletion app/shell-window.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>Beaker</title>
<title>SAFE Browser</title>
<link rel="stylesheet" href="beaker:shell-window.css">
<meta http-equiv="Content-Security-Policy" content="default-src beaker:; style-src beaker: 'unsafe-inline'; img-src *">
</head>
Expand Down
2 changes: 1 addition & 1 deletion authenticator
3 changes: 2 additions & 1 deletion scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const runSpawn = (title, cmdStr) => {
const targetScript = process.argv[2];

const packAuthenticator = () => {
const cmd = `npm run pack-authenticator:${(osPlatform === 'win32') ? 'windows' : 'unix'}`;
const toClean = (process.argv.indexOf('--clean') !== -1);
const cmd = `npm run pack-authenticator:${(osPlatform === 'win32') ? 'windows' : 'unix'} ${(toClean ? 'clean' : '')}`;
runSpawn('Pack Authenticator', cmd);
};

Expand Down
10 changes: 6 additions & 4 deletions scripts/pack_authenticator.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
git submodule update --init --recursive --remote
$clean=""
if ( $args[0] ) {
$clean="--clean"
}
git submodule update --init --recursive

$DEST_FOLD = "../app/node_modules/beaker-plugin-safe-authenticator"

cd authenticator

git submodule update --init --recursive --remote

npm i
npm run build-libs features="mock-routing"
npm run build-libs -- --features="mock-routing" $clean
npm run build

$FILES_ARR = @("./dist", "./index.js", "./package.json")
Expand Down
11 changes: 6 additions & 5 deletions scripts/pack_authenticator.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/bin/bash

git submodule update --init --recursive --remote
clean=""
if [ $1 ]; then
clean="--clean"
fi
git submodule update --init --recursive

DEST_FOLD="../app/node_modules/beaker-plugin-safe-authenticator"

cd authenticator

git submodule update --init --recursive --remote

npm i && npm run build-libs features="mock-routing" && npm run build
npm i && npm run build-libs -- --features="mock-routing" $clean && npm run build

mkdir -p $DEST_FOLD

Expand Down

0 comments on commit a38dd3a

Please # to comment.