Skip to content

Instantly share code, notes, and snippets.

View le6o's full-sized avatar

Martin Ledgard le6o

  • Birmingham, England
View GitHub Profile
@le6o
le6o / git-tag.rake
Created August 1, 2014 13:07
Capistrano task to tag git revision on deployment
namespace :deploy do
after :finishing, :git_tag do
run_locally do
if fetch(:skip_git_tag, false)
info "[git-tag] Tagging of deployment skipped"
else
user = capture(:git, "config --get user.name")
email = capture(:git, "config --get user.email")
tag_msg = "Deployed by #{user} <#{email}>"
@le6o
le6o / github-gitflow-jenkins-version-tag.sh
Last active August 29, 2015 14:12
Grab version number from last merged GitHub pull request of a gitflow release branch
#!/bin/bash
TAG=$(git log --format=%s --merges -n 1 | cut -d '/' -f 3)
if ! [[ $TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
return 1
fi
echo "TAG = $TAG" > properties
@le6o
le6o / deploy.rb
Created January 14, 2015 11:53
capistrano3, prompt for git tag to deploy, defaults to last tag
set :default_tag, `git tag`.split("\n").last
ask :tag, fetch(:default_tag)
set :branch, fetch(:tag).empty? ? fetch(:default_tag) : fetch(:tag)
@le6o
le6o / keybase.md
Created March 5, 2016 10:12
Keybase

Keybase proof

I hereby claim:

  • I am le6o on github.
  • I am le6o (https://keybase.io/le6o) on keybase.
  • I have a public key ASBl5RUEv6d5tTp4wsJuF-aGbkR1UTc-HV91_gXUy1Ur-Qo

To claim this, I am signing this object:

@le6o
le6o / app.yaml
Created March 27, 2018 11:34
gcp app engine flex custom runtime config
env: flex
runtime: custom