Skip to content

Instantly share code, notes, and snippets.

View christianschmizz's full-sized avatar

Christian Schmizz christianschmizz

View GitHub Profile
@christianschmizz
christianschmizz / runinenv.sh
Created March 11, 2012 19:44 — forked from parente/runinenv.sh
run a command in virtualenv, useful for supervisord
#!/bin/bash
VENV=$1
if [ -z $VENV ]; then
echo "usage: runinenv [virtualenv] CMDS"
exit 1
fi
. ${WORKON_HOME}/${VENV}/bin/activate
shift 1
echo "Executing $@ in ${VENV}"
exec "$@"
@christianschmizz
christianschmizz / Makefile.version
Created March 21, 2022 11:20 — forked from grihabor/Makefile.version
Makefile to use for incremental semantic versioning
MAKE := make --no-print-directory
DESCRIBE := $(shell git describe --match "v*" --always --tags)
DESCRIBE_PARTS := $(subst -, ,$(DESCRIBE))
VERSION_TAG := $(word 1,$(DESCRIBE_PARTS))
COMMITS_SINCE_TAG := $(word 2,$(DESCRIBE_PARTS))
VERSION := $(subst v,,$(VERSION_TAG))
VERSION_PARTS := $(subst ., ,$(VERSION))