-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* flake.lock: Update Flake lock file updates: • Updated input 'flake-parts': 'github:hercules-ci/flake-parts/59cf3f1447cfc75087e7273b04b31e689a8599fb' (2023-08-01) → 'github:hercules-ci/flake-parts/7f53fdb7bdc5bb237da7fefef12d099e4fd611ca' (2023-09-01) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd' (2023-08-10) → 'github:NixOS/nixpkgs/517501bcf14ae6ec47efd6a17dda0ca8e6d866f9' (2023-09-27) • Updated input 'treefmt-nix': 'github:numtide/treefmt-nix/19dee4bf6001849006a63f3435247316b0488e99' (2023-08-12) → 'github:numtide/treefmt-nix/720bd006d855b08e60664e4683ccddb7a9ff614a' (2023-09-27) * nix-update: convert to pyproject * drop old pkgs.nixVersions.stable fallback * add create-release.sh script
- Loading branch information
Showing
6 changed files
with
76 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu -o pipefail | ||
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" | ||
cd "$SCRIPT_DIR/.." | ||
|
||
version=${1:-} | ||
if [[ -z "$version" ]]; then | ||
echo "USAGE: $0 version" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [[ "$(git symbolic-ref --short HEAD)" != "master" ]]; then | ||
echo "must be on master branch" >&2 | ||
exit 1 | ||
fi | ||
|
||
# ensure we are up-to-date | ||
uncommitted_changes=$(git diff --compact-summary) | ||
if [[ -n "$uncommitted_changes" ]]; then | ||
echo -e "There are uncommitted changes, exiting:\n${uncommitted_changes}" >&2 | ||
exit 1 | ||
fi | ||
git pull [email protected]:Mic92/nix-update master | ||
unpushed_commits=$(git log --format=oneline origin/master..master) | ||
if [[ "$unpushed_commits" != "" ]]; then | ||
echo -e "\nThere are unpushed changes, exiting:\n$unpushed_commits" >&2 | ||
exit 1 | ||
fi | ||
sed -i -e "s!^version = \".*\"\$!version = \"${version}\"!" pyproject.toml default.nix | ||
git add pyproject.toml default.nix | ||
nix flake check -vL | ||
nix develop -c pytest -s . | ||
git commit -m "bump version ${version}" | ||
git tag -e "${version}" | ||
|
||
echo "now run 'git push --tags origin master'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "nix-update" | ||
description = "Swiss-knife for updating nix packages" | ||
version = "0.19.3" | ||
authors = [{ name = "Jörg Thalheim", email = "[email protected]" }] | ||
license = { text = "MIT" } | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Topic :: Utilities", | ||
"Intended Audience :: Developers", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/Mic92/nix-update" | ||
|
||
[project.scripts] | ||
nix-update = "nix_update:main" | ||
|
||
[tool.ruff] | ||
target-version = "py311" | ||
line-length = 88 | ||
|
@@ -7,6 +30,7 @@ ignore = [ "E501" ] | |
|
||
[tool.mypy] | ||
python_version = "3.11" | ||
pretty = true | ||
warn_redundant_casts = true | ||
disallow_untyped_calls = true | ||
disallow_untyped_defs = true | ||
|