aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/bytecodecompare/storebytecode.sh
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-07-03 20:52:29 +0800
committerGitHub <noreply@github.com>2017-07-03 20:52:29 +0800
commit76d3b7c5a160e1f550c710e6850ee6f116142ca1 (patch)
tree93c96f7073617b4f56c8c355cdc30701aec4818b /scripts/bytecodecompare/storebytecode.sh
parent78969364608ba60d1654f4d1738886d13112b6cd (diff)
parent2222ddecf49b5b901f63b9e7449ee76c9f51c47a (diff)
downloaddexon-solidity-76d3b7c5a160e1f550c710e6850ee6f116142ca1.tar.gz
dexon-solidity-76d3b7c5a160e1f550c710e6850ee6f116142ca1.tar.zst
dexon-solidity-76d3b7c5a160e1f550c710e6850ee6f116142ca1.zip
Merge pull request #2510 from ethereum/develop
Version 0.4.12
Diffstat (limited to 'scripts/bytecodecompare/storebytecode.sh')
-rwxr-xr-xscripts/bytecodecompare/storebytecode.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/scripts/bytecodecompare/storebytecode.sh b/scripts/bytecodecompare/storebytecode.sh
index 9a40bc6d..564de3f8 100755
--- a/scripts/bytecodecompare/storebytecode.sh
+++ b/scripts/bytecodecompare/storebytecode.sh
@@ -93,12 +93,19 @@ EOF
git config user.email "chris@ethereum.org"
git clean -f -d -x
- mkdir -p "$TRAVIS_COMMIT"
- REPORT="$TRAVIS_COMMIT/$ZIP_SUFFIX.txt"
+ DIRNAME=$(cd "$REPO_ROOT" && git show -s --format="%cd-%H" --date=short)
+ mkdir -p "$DIRNAME"
+ REPORT="$DIRNAME/$ZIP_SUFFIX.txt"
cp ../report.txt "$REPORT"
- git add "$REPORT"
- git commit -a -m "Added report $REPORT"
- git push origin
+ # Only push if adding actually worked, i.e. there were changes.
+ if git add "$REPORT"
+ then
+ git commit -a -m "Added report $REPORT"
+ git pull --rebase
+ git push origin
+ else
+ echo "Adding report failed, it might already exist in the repository."
+ fi
fi
)
-rm -rf "$TMPDIR" \ No newline at end of file
+rm -rf "$TMPDIR"