Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[[shell]]
Comment thread
thatvideoshopguy marked this conversation as resolved.
Resolved
indent_style = space
indent_size = 4
switch_case_indent = true
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
SHELL=/bin/bash
.DEFAULT_GOAL := help

SHELL_SOURCES = bin/dev*


# -------------------------------
# Common targets for Dev projects
# -------------------------------
#
# Edit these targets so they work as expected on the current project.
#
# Remember there may be other tools which use these targets, so if a target is not suitable for
# the current project, then keep the target and simply make it do nothing.

help: ## This help dialog.
help:
@awk '/^[\-[:alnum:]]*: ##/ { split($$0, x, "##"); printf "%20s%s\n", x[1], x[2]; }' $(MAKEFILE_LIST)

install-local: ## Install the tools needed to work on this project.
install-local:
brew install shfmt

format: ## Run this project's code formatters.
format:
shfmt --write $(SHELL_SOURCES)
3 changes: 1 addition & 2 deletions bin/dev-clone
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ git clone "$GIT_URI" .
# mkproject fails with super strict mode - so we need to allow unbound variables at this point
set +u

if grep --fixed-strings --silent "basepython" tox.ini;
then
if grep --fixed-strings --silent "basepython" tox.ini; then
PYTHON_VERSION=$(sed -e 's/basepython[[:space:]]=[[:space:]]//' -e 'tx' -e 'd' -e ':x' tox.ini | head -n 1)
PYTHON_VERSION_NUMBER=${PYTHON_VERSION/python/}
LATEST_PYTHON=$(pyenv latest "$PYTHON_VERSION_NUMBER")
Expand Down
2 changes: 1 addition & 1 deletion bin/dev-unlock-server
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi
HOST="$1"

LUKS_PASSPHRASE=$(op read "op://aizi3l3vxjc52mboshwj7bbytq/$HOST/password")
echo -n "$LUKS_PASSPHRASE" | \
echo -n "$LUKS_PASSPHRASE" |
ssh -o UserKnownHostsFile="$HOME/.ssh/known_hosts.cryptroot-unlock" \
-o StrictHostKeyChecking=accept-new \
-o BatchMode=yes \
Expand Down
2 changes: 1 addition & 1 deletion bin/dev-update-aws-config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ if [ -f ~/.aws/config ]; then
mv ~/.aws/config "$HOME/.aws/config.old.$OLD_TIMESTAMP"
fi

op read "op://Shared/AWS Config Template/notesPlain" | sed -e "s|USERNAME|$CONFIG_USERNAME|g" > ~/.aws/config
op read "op://Shared/AWS Config Template/notesPlain" | sed -e "s|USERNAME|$CONFIG_USERNAME|g" >~/.aws/config

echo "Config file updated!"