Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update semantic release / conventional commits / docker image n… #327

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion README-Dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,4 +741,21 @@ There is no other caching of "instance" data in Prez.

## Release Process

Semantic-release has been set up on this repository. Conventional Commit messages should be used for all commits (https://www.conventionalcommits.org/en/v1.0.0/), though it is not currently enforced with any actions etc. Releases are automatically made when PRs are merged to main, based on the commit messages. NB if squashing commits when merging a PR, the commit messages are merged, and the PR title will be included at the start of the commit message. This means the PR title needs to follow conventional commit conventions in order for the release process to be triggered.
[Semantic Release](https://github.com/cycjimmy/semantic-release-action) has been set up to automate the release process for this repository, based on [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). Conventional Commit messages should preferably be used for all commits, and MUST be used for PR titles (which become commit headers). PR Titles are validated using [commitlint](https://www.npmjs.com/package/commitlint), and if failing, will prevent a merge of the PR to main.

The release rules, i.e. how Semantic Release increments the version based on the commit messages, are as follows:

```yaml
- type: "feat"
release: "minor"
- type: "fix"
release: "patch"
- type: "perf"
release: "patch"
- type: "docs"
release: "patch"
- type: "revert"
release: "patch"
- breaking: true
release: "major"
```
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ poetry run python main.py

### Running in a Container

Prez container images are built using a Github Action and are available [here](https://github.com/RDFLib/prez/pkgs/container/prez).
Prez container images are built using a GitHub Action and are available [here](https://github.com/RDFLib/prez/pkgs/container/prez).

The Dockerfile in the repository can also be used to build a Docker image.

#### Image variants

The image name is `ghcr.io/rdflib/prez`.

The `latest` tag points to the latest stable release of Prez. All latest stable releases have a major, major and minor, and major, minor and patch tag pointing to it.
The `latest` tag points to the latest stable release of Prez. All latest stable releases have a `major`, `major.minor`, and `major.minor.patch` tag pointing to it.

For example, for a release with a git tag of 3.2.4, the following tags will be on the container image:

Expand All @@ -231,21 +231,8 @@ For example, for a release with a git tag of 3.2.4, the following tags will be o
- `3.2.4`
- `latest`

New commits to the `main` branch creates a rolling dev image with the `dev` tag. The dev builds will also include a tag in the form of major.minor.{patch+1}-dev.{commits-since-last-release}.{short-commit-sha}. This conforms to semantic versioning and will be recognized by orchestration systems to perform automatic releases.

For example, if the latest release is 3.2.4 and there have been 7 new commits since the release and the short commit SHA is fc82562, then the container image tag will be:

- `3.2.5-dev.7.fc82562`

To run the pulled docker image:

```
docker run -p 8000:8000 \
-e SPARQL_ENDPOINT=<your_sparql_endpoint> \
<your_image_id>
```

The above command starts a Docker container running Prez on port 8000, connected to the specified sparql endpoint.
The full version is automatically created/incremented using the [Semantic Release GitHub Action](https://github.com/cycjimmy/semantic-release-action), which automatically increments the version based on commits to the `main`
branch.

### Testing

Expand Down
Loading