feat: add create-script and tag-release
This commit is contained in:
parent
3d10ad02db
commit
140b9c13a0
18
bin/create-script
Executable file
18
bin/create-script
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ "$1" == "" ]]; then
|
||||||
|
echo "Usage: ${0##*/} <script-name>"; exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -ueo pipefail
|
||||||
|
|
||||||
|
cat > "${1}" << EOF
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x "${1}"
|
||||||
|
vim "${1}"
|
14
bin/tag-release
Executable file
14
bin/tag-release
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ "$1" == "" ]]; then
|
||||||
|
echo "Usage: ${0##*/} <sha=HEAD>"; exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
commit_sha="${1:-HEAD}"
|
||||||
|
tag="$(date '+%Y-%m-%d-%H.%M.%S')"
|
||||||
|
|
||||||
|
# Tag the appropriate commit and push to the remote.
|
||||||
|
git tag "${tag}" "${commit_sha}"
|
||||||
|
git push origin "refs/tags/${tag}"
|
|
@ -80,10 +80,12 @@
|
||||||
bindkey " " expand-alias-space
|
bindkey " " expand-alias-space
|
||||||
bindkey -M isearch " " magic-space
|
bindkey -M isearch " " magic-space
|
||||||
|
|
||||||
|
ialias cs="create-script"
|
||||||
ialias fetch="git fetch --all --jobs=4 --progress --prune"
|
ialias fetch="git fetch --all --jobs=4 --progress --prune"
|
||||||
ialias run="./run"
|
ialias run="./run"
|
||||||
ialias pull="git pull --autostash --jobs=4 --summary origin"
|
ialias pull="git pull --autostash --jobs=4 --summary origin"
|
||||||
ialias rebase="git rebase --autostash --stat"
|
ialias rebase="git rebase --autostash --stat"
|
||||||
|
ialias tag="tag-release"
|
||||||
ialias update="fetch && rebase"
|
ialias update="fetch && rebase"
|
||||||
|
|
||||||
# Nix and NixOS.
|
# Nix and NixOS.
|
||||||
|
|
Loading…
Reference in a new issue