mirror of
https://github.com/acaloiaro/ess
synced 2026-07-21 18:29:08 +00:00
chore: use version.txt rather than modifying source code on bump
Signed-off-by: Juan C. Müller <me@juancmuller.com>
This commit is contained in:
parent
44a904c668
commit
16eda61926
3 changed files with 18 additions and 15 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
{pkgs ? import <nixpkgs> {}, ...}:
|
{pkgs ? import <nixpkgs> {}, ...}:
|
||||||
pkgs.buildGoModule {
|
pkgs.buildGoModule {
|
||||||
pname = "ess";
|
pname = "ess";
|
||||||
version = "2.16.4";
|
version = pkgs.lib.strings.removeSuffix "\n" (builtins.readFile ./version.txt);
|
||||||
src = ./.;
|
src = ./.;
|
||||||
vendorHash = null;
|
vendorHash = null;
|
||||||
|
|
||||||
|
|
|
||||||
18
flake.nix
18
flake.nix
|
|
@ -45,17 +45,19 @@
|
||||||
scripts = {
|
scripts = {
|
||||||
prepare-release = {
|
prepare-release = {
|
||||||
description = "prepare a release";
|
description = "prepare a release";
|
||||||
exec = ''
|
exec =
|
||||||
|
# bash
|
||||||
|
''
|
||||||
git config --global user.email 'actions@github.com'
|
git config --global user.email 'actions@github.com'
|
||||||
git config --global user.name 'Github Actions'
|
git config --global user.name 'Github Actions'
|
||||||
OLD_TAG=$(svu current | sed 's/^v//g')
|
OLD_VERSION=$(svu current --tag.prefix "")
|
||||||
NEW_TAG=$(svu next | sed 's/^v//g')
|
NEW_VERSION=$(svu next --tag.prefix "" --always)
|
||||||
[ "$OLD_TAG" == "$NEW_TAG" ] && echo "no version bump" && exit 0
|
[ "$OLD_VERSION" == "$NEW_VERSION" ] && echo "no version bump" && exit 0
|
||||||
echo default.nix README.md | xargs sed -i "s/$OLD_TAG/$NEW_TAG/g"
|
sed -i "s/$OLD_VERSION/$NEW_VERSION/g" README.md
|
||||||
echo default.nix README.md | xargs sed -i "s/v$OLD_TAG/v$NEW_TAG/g"
|
echo "$NEW_VERSION" >version.txt
|
||||||
git add default.nix README.md
|
git add version.txt README.md
|
||||||
git commit -m "bump release version" --allow-empty
|
git commit -m "bump release version" --allow-empty
|
||||||
git tag v$NEW_TAG
|
git tag v$NEW_VERSION
|
||||||
git push
|
git push
|
||||||
git push --tags
|
git push --tags
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
1
version.txt
Normal file
1
version.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
2.16.4
|
||||||
Loading…
Reference in a new issue