Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
git アーカイブを使用して最新バージョン/HEAD の zip ファイルを作成していますが、ブランチ名とコミットを zip ファイル名に追加したいと考えています。どうすればこれを達成できますか?
このスクリプトを実行できます:
#!/bin/sh sha1=`git rev-parse --short --verify HEAD` branch=`git symbolic-ref -q --short HEAD` git archive -o latest_${branch}_${sha1}.zip HEAD
git-auto-archiveたとえば、それを実行可能にし、パスに入れ、次のように実行します
git-auto-archive
git auto-archive