Skip to content

Instantly share code, notes, and snippets.

@vholer
Created June 28, 2017 22:04
Show Gist options
  • Save vholer/cbfda0a0f5b89f230a3d33bc9e2e80e6 to your computer and use it in GitHub Desktop.
Save vholer/cbfda0a0f5b89f230a3d33bc9e2e80e6 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -xe
umask 0022
find . -type f -exec chmod a+r {} \;
find . -type d -exec chmod a+rx {} \;
# build1
M_ARCH=`puppet module build . | grep built | sed -e 's/^.*:\s*//'`
M_DIR=`echo ${M_ARCH} | sed -e 's/\.tar\.gz$//'`
cp -f "${M_DIR}/metadata.json" metadata.json
# build2
M_ARCH=`puppet module build . | grep built | sed -e 's/^.*:\s*//'`
M_DIR=`echo ${M_ARCH} | sed -e 's/\.tar\.gz$//'`
M_VER=`echo ${M_DIR} | sed -e 's/^.*-//'`
# changes?
puppet module changes "${M_DIR}"
git commit -av
git tag "${M_VER}"
git push -v
git push -v --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment