Skip to content

Commit

Permalink
Merge d33cc20 into 187bc18
Browse files Browse the repository at this point in the history
  • Loading branch information
XertroV committed Aug 1, 2018
2 parents 187bc18 + d33cc20 commit c65483f
Show file tree
Hide file tree
Showing 348 changed files with 12,299 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .soliumrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"double"
],
"comma-whitespace": 0,
"operator-whitespace": 0
"operator-whitespace": 0,
"indentation": ["off", 4],
"function-whitespace": 0
}
}
36 changes: 36 additions & 0 deletions compileProd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

set -e

DIST_DIR="dist"
C_SRC_DIR="contracts"
SOLC_VER=$(solc --version | tail -n 1 | cut -d ' ' -f 2 | cut -d '+' -f 1)

# TODO: Fix this, dont' want to delete archives //facepalm
rm -rf ./$DIST_DIR/* || true
mkdir -p $DIST_DIR || true

doSvCompile(){
cname="$(echo $1 | sed 's/\.sol$//g')"
cfile="$cname.sol"
dist_src="$DIST_DIR/$cfile"
# sensible snake case
distname=$(echo "$cname" | sed -E 's/([A-Z])([a-z])/_\L\1\2/g' | sed -E 's/([A-Z])([A-Z]*)/_\L\1\L\2/g' | sed 's/^_//')
outdir="dist/$distname"
solidity_flattener "./$C_SRC_DIR/$cfile" --solc-paths './lib,./ens,' > "$dist_src"
sed -i "s/pragma solidity \^0.4.13;/pragma solidity $SOLC_VER;\n\n\/\/ (c) 2018 SecureVote (Exo One Pty Ltd)/" "$dist_src"
mkdir -p "$outdir"
./bin/compile.sh -d "$DIST_DIR" -c "$cfile" -o "$outdir"
echo "-------------"
echo "$cname compile to $outdir"
echo "-------------"
}

# doSvCompile SVIndex
# doSvCompile SVIndexBackend
# doSvCompile SVPayments
# doSvCompile BBFarm
doSvCompile BBFarmRemote
# doSvCompile BBFarmProxy
# doSvCompile CommunityAuction
# doSvCompile EnsOwnerProxy
Loading

0 comments on commit c65483f

Please sign in to comment.