Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F8390074
Add a file to every repo
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Tgr
Jun 6 2017, 9:52 AM
2017-06-06 09:52:53 (UTC+0)
Size
746 B
Referenced Files
None
Subscribers
None
Add a file to every repo
View Options
FILE=/home/foo/file.ext
TASK=T12345
USER=foo
PASSWORD=s3cr3t
for project in `curl -s https://gerrit.wikimedia.org/r/projects/?type=CODE | tail -n+2 | jq --raw-output 'keys[]'`; do
dir=${project//\//_}
filename=`basename "$FILE"`
repo="https://$USER:$PASS@gerrit.wikimedia.org/r/a/$project"
mkdir $dir
cd $dir
echo "==> $project"
git clone --depth 1 $repo . \
&& cp "$FILE" . \
&& git add "$filename" \
&& git commit -m'
Add '"$filename"'
Bug: '$TASK'
Change-Id: I'`cat /dev/urandom | base64 | tr -dc 'a-f0-9' | head -c40` \
&& git push $repo HEAD:refs/for/master%topic=coc,submit
&& cd .. \
&& rm -rf $dir \
|| { cd .. && echo "**ERROR*** in $project"; }
done;
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4694149
Default Alt Text
Add a file to every repo (746 B)
Attached To
Mode
P5546 Add a file to every repo
Attached
Detach File
Event Timeline
Log In to Comment