This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ECHO='echo ' | |
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do | |
if [[ "$(git log $branch --since "6 months ago" | wc -l)" -eq 0 ]]; then | |
if [[ "$DRY_RUN" = "false" ]]; then | |
ECHO="" | |
fi | |
local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
$ECHO git branch -d "${local_branch_name}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
readonly ARGS="$@" | |
readonly DEPLOY_USER="www-data" | |
clone_repo_at_tag() { | |
local repo="$1" | |
local tag="$2" | |
local project_name="$3" | |
local repo_dirname="$project_name-$tag" |