Commit c09cb459 by Francisco Giordano Committed by github-actions

repurpose transpile-push script to transpile-branch

parent e68d7a3b
...@@ -28,4 +28,5 @@ jobs: ...@@ -28,4 +28,5 @@ jobs:
restore-keys: npm-v2- restore-keys: npm-v2-
- run: npm ci - run: npm ci
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
- run: bash scripts/upgrade-safe/transpile-push.sh - run: bash scripts/upgrade-safe/transpile-branch.sh master origin/master
- run: git push origin master
#!/usr/bin/env bash
set -euo pipefail
if [ $# -lt 1 ]; then
echo "usage: bash $0 <branch> [base]" >&2
exit 1
fi
set -x
branch="$1"
base="${2:-}"
bash scripts/upgrade-safe/transpile.sh
bash scripts/upgrade-safe/git-user-config.sh
commit="$(git rev-parse --short HEAD)"
git add contracts
git checkout --orphan "$branch"
if [ -n "$base" ]; then
git reset --soft "$base"
fi
if ! git diff --cached --quiet; then
git commit -m "Transpile $commit"
fi
#!/usr/bin/env bash
set -euo pipefail -x
bash scripts/upgrade-safe/transpile.sh
bash scripts/upgrade-safe/git-user-config.sh
COMMIT="$(git rev-parse --short HEAD)"
git add contracts
git checkout --orphan master
git reset --soft origin/master
if ! git diff --cached --quiet; then
git commit -m "Transpile $COMMIT"
fi
git push origin master
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment