Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Sed replace fix (no . in date)
  • Loading branch information
jacogr committed Feb 12, 2018
commit 688b7926bcb2a293eb6e58d49a98a576d2450e79
21 changes: 14 additions & 7 deletions publish-wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ REPO_AUTH="${GH_TOKEN}:@${REPO}"
SRCS=( "polkadot/runtime/wasm" "substrate/executor/wasm" "substrate/test-runtime/wasm" )
DST=".wasm-binaries"
TARGET="wasm32-unknown-unknown"
UTCDATE=`date -u "+%Y%m%d.%H%M%S"`
UTCDATE=`date -u "+%Y%m%d%H%M%S"`

pushd .

Expand All @@ -24,11 +24,11 @@ do
cd ../../..
done

if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "master" ]; then
popd
echo "*** Skipping wasm binary publish"
exit 0
fi
# if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "master" ]; then
# popd
# echo "*** Skipping wasm binary publish"
# exit 0
# fi

echo "*** Cloning repo"
rm -rf $DST
Expand All @@ -52,10 +52,17 @@ done

if [ -f "package.json" ]; then
echo "*** Updating package.json"
sed -i '.bak' "s/\"version\": \"[0-9.]*\"/\"version\": \"$UTCDATE\"/g" package.json
sed -i '.bak' "s/\"version\": \".*\"/\"version\": \"$UTCDATE\"/g" package.json
rm -rf package.json.bak
fi

if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "master" ]; then
popd
echo "*** Skipping wasm binary publish"
exit 0
fi


echo "*** Adding to git"
echo "$UTCDATE" > README.md
git add --all .
Expand Down