Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
5717bc76
Commit
5717bc76
authored
Nov 11, 2020
by
Francisco Giordano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve transpile-branch.sh script
(cherry picked from commit
d4315671
)
parent
bde507c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
transpile.yml
.github/workflows/transpile.yml
+1
-1
transpile-onto.sh
scripts/upgrade-safe/transpile-onto.sh
+17
-7
No files found.
.github/workflows/transpile.yml
View file @
5717bc76
...
...
@@ -29,5 +29,5 @@ jobs:
-
run
:
npm ci
if
:
steps.cache.outputs.cache-hit != 'true'
-
run
:
bash scripts/upgrade-safe/git-user-config.sh
-
run
:
bash scripts/upgrade-safe/transpile-
branch
.sh master origin/master
-
run
:
bash scripts/upgrade-safe/transpile-
onto
.sh master origin/master
-
run
:
git push origin master
scripts/upgrade-safe/transpile-
branch
.sh
→
scripts/upgrade-safe/transpile-
onto
.sh
View file @
5717bc76
...
...
@@ -3,26 +3,36 @@
set
-euo
pipefail
if
[
$#
-lt
1
]
;
then
echo
"usage: bash
$0
<
branch
> [base]"
>
&2
echo
"usage: bash
$0
<
target
> [base]"
>
&2
exit
1
fi
set
-x
branch
=
"
$1
"
base
=
"
${
2
:
-}
"
target
=
"
$1
"
base
=
"
${
2
-
}
"
bash scripts/upgrade-safe/transpile.sh
commit
=
"
$(
git rev-parse
--short
HEAD
)
"
branch
=
"
$(
git rev-parse
--abbrev-ref
HEAD
)
"
git add contracts
git checkout
--orphan
"
$branch
"
if
[
-n
"
$base
"
]
;
then
git reset
--soft
"
$base
"
git checkout
--quiet
--detach
if
git rev-parse
--quiet
--verify
"
$target
"
;
then
git reset
--soft
"
$target
"
git checkout
"
$target
"
else
if
[
-n
"
$base
"
]
;
then
git reset
--soft
"
$base
"
fi
git checkout
--orphan
"
$target
"
fi
if
!
git diff
--
cached
--quiet
;
then
if
!
git diff
--
quiet
--cached
;
then
git commit
-m
"Transpile
$commit
"
fi
git checkout
"
$branch
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment