How do I archive an AOSP repo like git-archive doing?

我怕爱的太早我们不能终老 提交于 2021-02-08 04:37:24

问题


I have used this command to archive a git source code:

git archive --format=tgz -o ~/myproj-20180402.tgz --prefix=myproj/ master

Are there same/similar way to archive a AOSP repo branch or tag. How to do ? Any help would be greatly appreciated.


回答1:


AOSP code is not a single git project, it's actually many more (hundreds). So there is not a git command per-se.

What you could do is use repo this way:

repo forall -j16 "<your-git-command-1; your-git-command-2>"

So for the exact git command you proposed it would be:

repo forall -j16 "git archive --format=tgz -o ~/myproj-20180402.tgz --prefix=myproj/ master"

But keep in mind there is not a single git project, so you will end up with hundreds of archives, each inside it's root dir. Check the manifest you sync for a full list of projects and it's location locally.



来源:https://stackoverflow.com/questions/49603844/how-do-i-archive-an-aosp-repo-like-git-archive-doing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!