Skip to content

Instantly share code, notes, and snippets.

@charz
Created January 23, 2014 03:08
Show Gist options
  • Save charz/8572172 to your computer and use it in GitHub Desktop.
Save charz/8572172 to your computer and use it in GitHub Desktop.
Create a zip archive with git version
#!/bin/bash
SRC=pkg-name
VER=`cd ${SRC}; git describe`
echo 'Try to pack: '${VER}
cp -a ${SRC} ${SRC}_v${VER}
tar czvf ${SRC}_v${VER}.tar.gz --exclude .git --exclude ".git*" ${SRC}_v${VER}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment