Jake Whatley | 4e1248a | 2016-03-10 21:22:56 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (C) 2016 OmniROM Project |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| 17 | echo -e "Enter the username" |
| 18 | read username |
micky387 | 88ad221 | 2021-05-03 12:47:47 +0200 | [diff] [blame^] | 19 | echo -e "Enter the topic branch name (only needed for gerrit)" |
| 20 | read topicname |
| 21 | echo -e "Do you want to push on "github" or "gerrit" ?" |
| 22 | read admin |
| 23 | |
| 24 | OPERATION="${admin}" |
Jake Whatley | 4e1248a | 2016-03-10 21:22:56 -0500 | [diff] [blame] | 25 | |
| 26 | url="gerrit.omnirom.org" |
| 27 | port="29418" |
micky387 | f250ac0 | 2021-10-17 14:18:16 +0200 | [diff] [blame] | 28 | branch="android-12.0" |
Jake Whatley | 4e1248a | 2016-03-10 21:22:56 -0500 | [diff] [blame] | 29 | |
| 30 | cd ../../../ |
| 31 | |
| 32 | while read path; |
| 33 | do |
| 34 | |
Humberto Borba | 5dc4c6e | 2018-02-03 00:34:23 -0200 | [diff] [blame] | 35 | project=`echo android_${path} | sed -e 's/\//\_/g'`; |
| 36 | if [ "${path}" == "build" ] ; then |
| 37 | path="build/make"; |
Humberto Borba | 3429f95 | 2017-09-08 10:49:37 -0300 | [diff] [blame] | 38 | fi |
Jake Whatley | 4e1248a | 2016-03-10 21:22:56 -0500 | [diff] [blame] | 39 | |
| 40 | echo "" |
| 41 | echo "=====================================================================" |
| 42 | echo " PROJECT: ${project} -> [ ${path}/ ]" |
| 43 | echo "" |
| 44 | |
| 45 | cd $path; |
| 46 | |
| 47 | echo " Pushing..." |
micky387 | 88ad221 | 2021-05-03 12:47:47 +0200 | [diff] [blame^] | 48 | |
| 49 | if [[ "${OPERATION}" == "github" ]]; then |
| 50 | echo " git push --no-thin ssh://${username}@${url}:${port}/${project} HEAD:refs/heads/${branch}" |
| 51 | git push --no-thin ssh://${username}@${url}:${port}/${project} HEAD:refs/heads/${branch} |
| 52 | elif [[ "${OPERATION}" == "gerrit" ]]; then |
| 53 | echo " git push --no-thin ssh://${username}@${url}:${port}/${project} HEAD:refs/for/${branch}%topic=${topicname}" |
| 54 | git push --no-thin ssh://${username}@${url}:${port}/${project} HEAD:refs/for/${branch}%topic=${topicname} |
| 55 | fi |
Jake Whatley | 4e1248a | 2016-03-10 21:22:56 -0500 | [diff] [blame] | 56 | echo "" |
| 57 | |
| 58 | cd - > /dev/null |
| 59 | |
Humberto Borba | 87dbab2 | 2016-07-28 19:05:13 -0300 | [diff] [blame] | 60 | done < vendor/omni/utils/aosp-forked-list |