git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Existing utility to track compiled files in another sister repository, for rollouts

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 23, 2012, 16:28 UTC
Message-ID
<CACBZZX6SVSn17nfSarQC1qgz-TxcDDn5tvHb0BkyW9S8DcLY4w@mail.gmail.com>

I'm planning on using Git for a deployment process where the steps are basically:

 1. You log into a deployment host, cd into software.git, do git pull
 2. A tool runs "make" for you, creates a deployment-YYYYMMDD-HHMMSS tag
 3. That make step will create a bunch of generated (text) files
 4. Get a list of these with : git clean -dxfn
 5. Copy those to to software-generated.git, removing any that we
didn't just create, adding any that are new
 6. Commit that, tag it with generated-deployment-YYYYMMDD-HHMMSS
 7. Push out both our generated software.git and
software-generated.git tag to our servers
 8. git reset --hard both of those to our newly pushed out tags
 9. Do git clean -dxf on software.git remove old generated files
 10. Copy new generated files from generated-software.git to software.git
 11. Restart our application to pick up the new software

For this I'll need to write some "git snapshot-commit" tool for #5 and #6 to commit whatever the current state of the directory is (with removed/added files), and hack up something to do #9-#10.

This should all be relatively easy, I was just wondering if there was any prior art on this that I could use instead of hacking it up myself.

For what it's worth the reason I'm using Git like this for deployment is that I'm converting things away from an rsync-based sync process that's becoming increasingly slow since rsync with -c needs to recursively checksum everything we're syncing out (which is quite a lot), since it's all text files Git can be really efficient in just transferring deltas and quickly doing a hard reset to a new commit.

Next: Junio C Hamano
Message 1 of 3 in “Existing utility to track compiled files in another sister repository, for rollouts”
  1. Ævar Arnfjörð BjarmasonAug 23, 2012
  2. Junio C HamanoAug 23, 2012
  3. Ævar Arnfjörð BjarmasonAug 23, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.