mirror of
https://github.com/kiviktnm/decman.git
synced 2026-09-19 20:18:28 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dacad6be2 | ||
|
|
5fe7df23db |
@@ -148,7 +148,7 @@ decman.user_packages.append(
|
||||
pkgname="decman-git",
|
||||
# Note, this example may not be up to date
|
||||
provides=["decman"],
|
||||
version="0.3.0",
|
||||
version="0.3.1",
|
||||
dependencies=["python", "python-requests", "devtools", "pacman", "systemd", "git"],
|
||||
make_dependencies=[
|
||||
"python-setuptools", "python-build", "python-installer", "python-wheel"
|
||||
@@ -276,7 +276,7 @@ user_packages = [{
|
||||
pkgname="decman-git",
|
||||
# Note, this example may not be up to date
|
||||
provides=["decman"],
|
||||
version="0.3.0",
|
||||
version="0.3.1",
|
||||
dependencies=["python", "python-requests", "devtools", "pacman", "systemd", "git"],
|
||||
make_dependencies=[
|
||||
"python-setuptools", "python-build", "python-installer", "python-wheel"
|
||||
|
||||
@@ -82,7 +82,7 @@ class MyModule(Module):
|
||||
return [
|
||||
UserPackage(
|
||||
pkgname="decman-git",
|
||||
version="0.3.0",
|
||||
version="0.3.1",
|
||||
provides=["decman"],
|
||||
dependencies=[
|
||||
"python",
|
||||
|
||||
+4
-1
@@ -40,7 +40,7 @@ decman.config.makepkg_user = "kk"
|
||||
decman.user_packages.append(
|
||||
UserPackage(
|
||||
pkgname="decman-git",
|
||||
version="0.3.0",
|
||||
version="0.3.1",
|
||||
provides=["decman"],
|
||||
dependencies=[
|
||||
"python",
|
||||
@@ -230,6 +230,9 @@ class MyCommands(decman.config.Commands):
|
||||
def git_get_commit_id(self) -> list[str]:
|
||||
return ["git", "rev-parse", "HEAD"]
|
||||
|
||||
def git_log_commit_ids(self) -> list[str]:
|
||||
return ["git", "log", "--format=format:%H"]
|
||||
|
||||
def review_file(self, file: str) -> list[str]:
|
||||
return ["less", file]
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "decman"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
description = "Declarative package & configuration manager for Arch Linux."
|
||||
license = {file = "LICENSE"}
|
||||
authors = [
|
||||
|
||||
@@ -136,6 +136,12 @@ class Commands:
|
||||
"""
|
||||
return ["git", "rev-parse", "HEAD"]
|
||||
|
||||
def git_log_commit_ids(self) -> list[str]:
|
||||
"""
|
||||
Running this command outputs commit hashes of the repository.
|
||||
"""
|
||||
return ["git", "log", "--format=format:%H"]
|
||||
|
||||
def review_file(self, file: str) -> list[str]:
|
||||
"""
|
||||
Running this command outputs a file for the user to see.
|
||||
|
||||
@@ -1078,7 +1078,14 @@ before and thus are found in the cache."
|
||||
default=True):
|
||||
latest_reviewed_commit = self._store.pkgbuild_latest_reviewed_commits.get(
|
||||
pkgbase)
|
||||
if latest_reviewed_commit is None:
|
||||
|
||||
git_commit_ids = subprocess.run(
|
||||
conf.commands.git_log_commit_ids(),
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
).stdout.decode().strip().split('\n')
|
||||
|
||||
if latest_reviewed_commit is None or latest_reviewed_commit not in git_commit_ids:
|
||||
for file in os.scandir("."):
|
||||
if file.is_file() and not file.name.startswith("."):
|
||||
subprocess.run(conf.commands.review_file(
|
||||
|
||||
Reference in New Issue
Block a user