Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
4e6954c9
Commit
4e6954c9
authored
Aug 12, 2017
by
Jeromy Johnson
Committed by
GitHub
Aug 12, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4136 from ipfs/feat/misc/zcash-is-being-used
misc: add feat/zcash to go-ipfs-archived exemption
parents
a1e923e2
345519e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
bin/archive-branches.sh
bin/archive-branches.sh
+3
-2
No files found.
bin/archive-branches.sh
View file @
4e6954c9
...
...
@@ -13,6 +13,7 @@ api_repo="repos/$org/$repo"
exclusions
=(
'master'
'release'
'feat/zcash'
)
gh_api_next
()
{
...
...
@@ -20,7 +21,7 @@ gh_api_next() {
echo
"
$links
"
|
grep
'; rel="next"'
>
/dev/null
||
return
link
=
$(
echo
"
$links
"
|
grep
'; rel="next"'
|
sed
-e
's/^<//'
-e
's/>.*//'
)
curl
$auth
-f
-sD
>(
gh_api_next
)
$link
curl
$auth
-f
-sD
>(
gh_api_next
)
"
$link
"
}
gh_api
()
{
...
...
@@ -49,7 +50,7 @@ git remote add archived "git@github.com:$org/$arch_repo.git" || true
cat
<
(
active_branches
)
<
(
pr_branches
)
<
((
IFS
=
$'
\n
'
;
echo
"
${
exclusions
[*]
}
"
))
\
|
sort
-u
|
comm
- <
(
origin_refs |
sort
)
-13
|
\
while
read
ref
;
do
while
read
-r
ref
;
do
git push archived
"origin/
$ref
:refs/heads/
$ref
/
$(
date
--rfc-3339
=
date
)
"
git push origin
--delete
"
$ref
"
done
...
...
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