Skip to content

Commit

Permalink
Move submodules pull to preinstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Feb 16, 2023
1 parent ec36ada commit f958b97
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

git submodule update --init --recursive

git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD --exit-code -- package-lock.json > /dev/null 2>&1 || echo "📦 package-lock.json changed. Running npm install..." && npm install
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"dev:ssv": "scripts/ssv/dev -n \"$npm_config_nodes\"",
"docgen": "npm run docgen --workspace @casimir/ethereum",
"lint": "eslint --ext .vue,.ts ./ --fix",
"postinstall": "git submodule update --init --recursive && npm exec --workspaces npm run build",
"postinstall": "npm exec --workspaces npm run build",
"preinstall": "git submodule update --init --recursive",
"prepare": "husky install",
"test": "echo \"Error: no test specified\" && exit 1",
"test:actions": "npx esno -r dotenv/config scripts/actions/test.ts --workflow \"$npm_config_workflow\"",
Expand Down
3 changes: 0 additions & 3 deletions scripts/ethereum/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import { getSecret } from '@casimir/aws-helpers'
* - https://hardhat.org/hardhat-network/docs/overview
*/
void async function () {
// Fetch remote submodule code
$`git submodule update --init --recursive`

// Get shared seed
const seed = await getSecret('consensus-networks-bip39-seed')
process.env.BIP39_SEED = seed
Expand Down
3 changes: 0 additions & 3 deletions scripts/ethereum/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import { getSecret } from '@casimir/aws-helpers'
* - https://hardhat.org/hardhat-network/docs/overview
*/
void async function () {
// Fetch remote submodule code
$`git submodule update --init --recursive`

const seed = await getSecret('consensus-networks-bip39-seed')
process.env.BIP39_SEED = seed
echo(chalk.bgBlackBright('Your mnemonic is ') + chalk.bgBlue(seed))
Expand Down
3 changes: 0 additions & 3 deletions scripts/ledger/emulate
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ if [ -z "$app" ]; then
echo "app is not set, using default app $app"
fi

# Fetch submodules for speculos and ledger apps
git submodule update --init --recursive

resource_path=scripts/ledger/resources

if [ ! -f "$resource_path/speculos/apps/$app.elf" ]; then
Expand Down
2 changes: 0 additions & 2 deletions scripts/local/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ const Stage = pascalCase(stage as string)
* --external: externalize all rpc urls (optional, i.e., --external=true)
*/
void async function () {
/** Fetch remote submodule code */
$`git submodule update --init --recursive`

/** Set project-wide variables */
process.env.PROJECT = project
Expand Down
3 changes: 0 additions & 3 deletions scripts/trezor/emulate
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ else
echo "PROFILE is not set, using default profile '$PROFILE'"
fi

# Fetch submodules for trezor apps
git submodule update --init --recursive

# Todo programmatically launch emulator with seed
# # Get the bip39 seed from AWS
# seed_secret_id=consensus-networks-bip39-seed
Expand Down

0 comments on commit f958b97

Please sign in to comment.