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
name: Publish Docker Image | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
publish: | |
runs-on: ubuntu-latest |
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
# # # | |
# Manage alternate files by linking different versions to the canonical file name. | |
# # # | |
define safe-unlink-file | |
@# File is not a link, so back-up | |
@#$(or $(shell test -L $1 && echo 'TRUE'), $(call backup-file,$1)) | |
@# File does not exist, or try to remove | |
@#$(if $(shell (test -L $1 || test -e $1) && echo 'TRUE'), $(shell rm -f $1)) | |
endef |
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
-include service/${TASK}.conf | |
ifdef STACK | |
STACK := $(strip ${STACK}) | |
STACK_NAME := $(shell echo "${STACK}" | tr A-Z a-z) | |
STACK_ID := $(shell echo "${STACK}" | tr a-z A-Z) | |
include stack/${STACK_NAME}.conf | |
endif | |
ifdef ${STACK_ID}_STACK |
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
# bring up the ssh tunnel without requiring leaving a terminal open | |
# by opening a connection without a shell with the -N option. | |
# nohup helps to keep open the connection. | |
# provide an optional log, which might help troubleshooting. | |
# combine stderr and stdout( 2>&1 ) | |
# send to background ( & ) | |
connect() { | |
nohup ssh tunnel -N > ~/.tunnel.log 2>&1 & | |
} |
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
BEGIN { | |
patch_file = "ERR" # initialize | |
patches = "patches" # dir to output patches | |
if (ENVIRON["PATCH_DIR"]) { | |
patches = ENVIRON["PATCH_DIR"] | |
} | |
system("test -d " patches " || mkdir -p " patches) | |
} |
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
#!/usr/bin/env bash | |
# generate a strong password without shell special characters | |
# defaults to 32 characters, overridden to a number passed as first arg | |
# uses xclip to copy to clipboard | |
# uses zenity to alert to desktop (from gnome-run-prompt) | |
gen_pass_length=32 | |
if [ $# -eq 1 ]; then | |
gen_pass_length="$1" |
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
# # # | |
# Looks for ${PROJ_ROOT}conf/ssh_config. | |
# Export PROJ_ROOT or SSH_CONFIG | |
# | |
# Minimal orchestration through filtering of HOST_LIST | |
# by a prefix/suffix in ssh Host aliases specified in ENV. | |
# Defaults to 'stage' | |
# | |
# Targets with 'all-' prefix execute commands against all |
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
PROJ_ROOT = /var/www/# | |
WEB_ROOT = ${PROJ_ROOT}html/# | |
ARCH_DIR = ${PROJ_ROOT}util/# | |
TAR_EXCLUDES = templates_c ConfigAndLog private/backup_migrate naloxone-training files/civicrm/custom default/files/civicrm/upload | |
all snapshot: clean html.tgz members.sql.gz | |
define tar-exclude-list | |
$(foreach excl,$1,--exclude=${excl} ) | |
endef |
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 | |
gitsubs() { | |
gitsubs_max_depth=12 | |
echo searching for git repos | |
echo directory max-depth = $gitsubs_max_depth | |
echo executing git $@ | |
( # use a subshell and change the field-separator | |
# to allow for spaces in filenames |
NewerOlder