mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
Remove poetry2nix-release tool
I'm now always fully relying on Github Actions for testing pre-release. This tool isn't helpful and makes the development shell larger.
This commit is contained in:
parent
f81671afe3
commit
604adc454f
2 changed files with 0 additions and 38 deletions
|
@ -16,7 +16,6 @@ pkgs.mkShell {
|
||||||
tools.env
|
tools.env
|
||||||
tools.py2-astparse
|
tools.py2-astparse
|
||||||
tools.flamegraph
|
tools.flamegraph
|
||||||
tools.release
|
|
||||||
pkgs.nixpkgs-fmt
|
pkgs.nixpkgs-fmt
|
||||||
pkgs.poetry
|
pkgs.poetry
|
||||||
pkgs.niv
|
pkgs.niv
|
||||||
|
|
|
@ -11,43 +11,6 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
release =
|
|
||||||
let
|
|
||||||
pythonEnv = pkgs.python3.withPackages (
|
|
||||||
ps: [
|
|
||||||
ps.pythonix
|
|
||||||
]
|
|
||||||
);
|
|
||||||
in
|
|
||||||
pkgs.writeScriptBin "poetry2nix-release" ''
|
|
||||||
#!${pythonEnv.interpreter}
|
|
||||||
import subprocess
|
|
||||||
import argparse
|
|
||||||
import nix
|
|
||||||
import sys
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
tag_latest = subprocess.run(['git', 'describe', '--abbrev=0'], stdout=subprocess.PIPE, check=True).stdout.decode().strip()
|
|
||||||
version_latest = nix.eval('(import ${srcPath} {}).version')
|
|
||||||
|
|
||||||
if tag_latest == version_latest:
|
|
||||||
sys.stderr.write('Version number not bumped in default.nix\n')
|
|
||||||
sys.stderr.flush()
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
p = subprocess.run(['git', 'status', '--short'], stdout=subprocess.PIPE)
|
|
||||||
if p.stdout.decode().strip() != "":
|
|
||||||
sys.stderr.write('Git tree is dirty\n')
|
|
||||||
sys.stderr.flush()
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
subprocess.run(['nix-build', '--no-out-link', '${srcPath + "/tests"}'], check=True)
|
|
||||||
subprocess.run(['${srcPath + "/check-fmt"}'], check=True)
|
|
||||||
|
|
||||||
p = subprocess.run(['git', 'tag', '-a', version_latest])
|
|
||||||
exit(p.returncode)
|
|
||||||
'';
|
|
||||||
|
|
||||||
flamegraph =
|
flamegraph =
|
||||||
let
|
let
|
||||||
runtimeDeps = lib.makeBinPath [
|
runtimeDeps = lib.makeBinPath [
|
||||||
|
|
Loading…
Add table
Reference in a new issue