Skip to content

Instantly share code, notes, and snippets.

@adrian-green
Created February 12, 2020 06:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#!/bin/bash
#Repo directory name
FNAME=${PWD##*/}
#Latest tag (release)
TAG=`git describe --abbrev=0 --tags`
#Create zip archive named after repo and tag, containing repo contents @HEAD
git archive -9 --prefix $FNAME/ HEAD -o ../$FNAME-$TAG.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment