diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..dab104f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,18 @@ +{ + "features": { + "ghcr.io/devcontainers-extra/features/apt-get-packages:1": { + "version": "latest", + "packages": "shellcheck" + } + }, + "postCreateCommand": "bash scripts/devcontainer_postCreateCommand.sh", + "customizations": { + "vscode": { + "extensions": [ + "rogalmic.bash-debug", + "timonwong.shellcheck", + "mads-hartmann.bash-ide-vscode" + ] + } + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ebc80..1d6753c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added - Debug scripts by setting `TRACE=1`. +- Add semver-cli for git tagging. ### Changed - Warn on certain unset envvars instead of error-exit. diff --git a/README.md b/README.md index 6126e91..7c2bf87 100644 --- a/README.md +++ b/README.md @@ -593,13 +593,13 @@ $ tail -f /tmp/restic-automatic-backup-scheduler.log # or follow output like thi ``` # Releasing -To make a new release: -1. Create a new tag: - ```console - $ vi CHANGELOG.md && git commit -am "Update CHANGELOG.md" - $ git tag vX.Y.Z - $ git push && git push --tags - ``` +1. Create a new version of this project by using [semver-cli](https://github.com/maykonlsf/semver-cli). + ```shell + vi CHANGELOG.md + semver up minor + ver=$(semver get release) + git commit -am "Bump version to $ver" && git tag $ver && git push --atomic origin main $ver + ``` 1. Update version in the AUR [PKGBUILD](https://aur.archlinux.org/packages/restic-automatic-backup-scheduler/) 1. Update version in the Homebrew Formulas (see the repo README): * [restic-automatic-backup-scheduler](https://github.com/erikw/homebrew-tap/blob/main/Formula/restic-automatic-backup-scheduler.rb) diff --git a/scripts/devcontainer_postCreateCommand.sh b/scripts/devcontainer_postCreateCommand.sh new file mode 100755 index 0000000..57550c0 --- /dev/null +++ b/scripts/devcontainer_postCreateCommand.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Devcontainer postCreateCommand. +# Install dependencies for running this project in GitHub Codespaces. + +set -eux + +# For git version tagging: +go install github.com/maykonlsf/semver-cli/cmd/semver@latest