Add semver-cli and devcontainers

This commit is contained in:
Erik Westrup
2025-03-04 15:14:59 +00:00
committed by GitHub
parent d36a5e850d
commit 3089709038
4 changed files with 34 additions and 7 deletions

View File

@@ -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"
]
}
}
}

View File

@@ -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.

View File

@@ -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)

View File

@@ -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