我正在使用OpenProject作爲項目管理軟件,我對ruby和rails並不是很熟悉,但使用gitolite插件工作得很好。如何以zip文件的形式發佈一個git倉庫
我要尋找一個解決方案,提供的鏈接OpenProject用戶,他們可以直接下載的gitolite託管存儲庫作爲zip文件。
這可能嗎?
我願意將代碼塊放在一起,所以即使部分解決方案和提示也是受歡迎的。 thx。
我正在使用OpenProject作爲項目管理軟件,我對ruby和rails並不是很熟悉,但使用gitolite插件工作得很好。如何以zip文件的形式發佈一個git倉庫
我要尋找一個解決方案,提供的鏈接OpenProject用戶,他們可以直接下載的gitolite託管存儲庫作爲zip文件。
這可能嗎?
我願意將代碼塊放在一起,所以即使部分解決方案和提示也是受歡迎的。 thx。
在oliverguenther/openproject-revisions_git
什麼都不會做了:
git bundle
(在一個文件中全面回購歷史)git archive
(最新的工作樹作爲一個zip文件)您將需要延長該插件爲了揭露該功能,實現了一個ruby函數來調用正確的項目上的git-archive,一個bit like in this gist:
(摘錄)
# Runs the `git archive` command to pull your repository out
# into a tar or tar.gz and writes it to a temporary directory
#
# Args:
# * path - path within the repository to archive, defaults to the root
#
# Returns the path to the tar file
def archive(path=nil)
@archive_path = path || ''
create_tmp_directory
@tar_path = "#{@tmp_directory_path}/archive.tar#{@gzip}"
Dir.chdir @path
puts "Archived repository" if run_shell_cmd "git archive --prefix=#{@archive_path}/ #{@branch}:#{@archive_path} -o #{@tar_path}" and @verbose
Dir.chdir @pwd
@tar_path
end
非常感謝,我會深入探討這一點 –
爲什麼不主持它在SourceForge上什麼 – 13aal
「混帳實現」命令將項目文件導出到一個zip文件。 – gzh
您是否需要知識庫,包含整個歷史記錄,還是隻需要源代碼樹的快照? – user3159253