Skip to content

Commit

Permalink
Merge pull request #11 from oscal-compass/dev
Browse files Browse the repository at this point in the history
switch to use static versioning
  • Loading branch information
yana1205 authored May 2, 2024
2 parents d8eb84e + 7232edd commit f7f19c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ test-plugin: TARGET ?= plugins_public/tests/
test-plugin: .venv
@OUTPUT_PATH=/dev/null $(PYTHON) -m pytest $(ARGS) $(TARGET)

# After published, the branch must be merged first-forwardly. TODO: Integrate with CI
publish: GIT_TAG ?=
publish:
@toml set --toml-path pyproject.toml project.version $(GIT_TAG)
@git add pyproject.toml
@git commit -m "update version to $(GIT_TAG)"
@git tag $(GIT_TAG)

clean: .venv
@rm -rf build *.egg-info dist
@find ./plugins -type d \( -name '*.egg-info' -o -name 'dist' \) | while read x; do echo $$x; rm -r $$x ; done
Expand Down
11 changes: 3 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
[build-system]
requires = ["setuptools", "setuptools-git-versioning"]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools-git-versioning]
enabled = true
count_commits_from_version_file = true
dev_template = "{tag}.post{ccount}+git.{sha}.dirty"
dirty_template = "{tag}.post{ccount}+git.{sha}.dirty"

[tool.setuptools]
package-dir = { "c2p" = "c2p" }

[tool.setuptools.packages.find]
include = ["c2p*"]

[project]
dynamic = ["version"]
version = "v0.3.0"
name = "compliance-to-policy"
authors = [{ name = "Takumi Yanagawa", email = "[email protected]" }]
description = "Tools to bridge Compliance and Policy"
Expand Down Expand Up @@ -47,6 +41,7 @@ dev = [
"pytest>=8.0.0",
"pre-commit>=2.4.0",
"pep8-naming",
"toml-cli",
"types-PyYAML",
"types-setuptools",
## Docs website
Expand Down

0 comments on commit f7f19c2

Please sign in to comment.