Skip to content

Instantly share code, notes, and snippets.

View marton78's full-sized avatar

Márton Danóczy marton78

View GitHub Profile
@marton78
marton78 / repo_version.sh
Last active April 15, 2019 14:41
Bash script to auto-generate versioning information based on Git history
#!/bin/bash
# This script determines a version string and a deployment target based on Git history
#
# Returns: VERSION DEPLOYMENT_TARGET
# where DEPLOYMENT_TARGET is [prod|stage|dev|'']
branch=$(git rev-parse --abbrev-ref HEAD)
tag=$(git describe --tags --exact-match 2>/dev/null)
@marton78
marton78 / dot.svg
Last active October 10, 2017 11:08
orange dot
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.