FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
uniswap_interface_sc/scripts/turbo-changed.sh at main · stringcode86/uniswap_interface_sc · GitHub
stringcode86
/
uniswap_interface_sc
Public
forked from
Uniswap/interface
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
uniswap_interface_sc
/
scripts
/
turbo-changed.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
41 lines (31 loc) · 1.38 KB
Breadcrumbs
uniswap_interface_sc
/
scripts
/
turbo-changed.sh
Copy path
File metadata and controls
executable file
·
41 lines (31 loc) · 1.38 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!
/bin/bash
command=
$1
#
remove first argument so we pass along options to turbo
shift
#
Validate command input
if
[[
!
$command
=~
^(lint
|
test
|
typecheck
|
format)$ ]]
;
then
echo
"
Invalid command:
$command
. Must be one of: format, lint, test, typecheck.
"
exit
1
fi
export
NODE_OPTIONS=
"
--max_old_space_size=8192
"
#
When a GitHub Actions workflow checks out a repository, it does so in a detached HEAD state and merges the PR with the target branch.
#
To filter for all changes from this PR in turbo, we check all changes in the branch against the target branch.
#
HEAD = the merge commit of this PR into the target branch
#
HEAD^1 = last commit on the target branch (typically main)
echo
"
Is CI mode?
$CI
"
if
[
"
$CI
"
==
"
true
"
]
;
then
turbo run
$command
--log-prefix=none --concurrency=100% --filter=
"
...[HEAD^1]
"
--
"
$@
"
exit
$?
fi
#
If not on CI, run the turbo command with the provided or detected branch and any extra flags
#
e.g. if you want to run dry mode locally, run `./scripts/turbo.sh lint $(git branch --show-current) --dry`
cur_branch=
$(
git branch --show-current
)
branch=
${1
:-
$cur_branch
}
#
Check if the branch name is provided
if
[[
-z
"
$branch
"
||
$branch
==
-
*
]]
;
then
echo
"
Error: Branch name is required.
"
exit
1
fi
#
Shift branch argument, so $@ contains only the extra flags
shift
turbo run
$command
--concurrency=100% --filter=
"
...[main...
$branch
]
"
--
"
$@
"
Back
|
FazBrowse Home
|
New Git URL