Skip to content

Commit

Permalink
Merge development/v3.0 to master
Browse files Browse the repository at this point in the history
Signed-off-by: Gary O'Neall <[email protected]>
Signed-off-by: Arthit Suriyawongkul <[email protected]>
  • Loading branch information
goneall authored and bact committed Apr 23, 2024
1 parent 4021a7a commit e35e26b
Show file tree
Hide file tree
Showing 91 changed files with 28,584 additions and 44,090 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/publish_v3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
on:
push:
branches:
- development/v3.0
repository_dispatch:
types:
- publish_v3_spec
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
container: python:3
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
ref: development/v3.0
path: spdx-spec
fetch-depth: 0 # Because we will be pushing the gh-pages branch
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
repository: spdx/spec-parser
ref: main
path: spec-parser
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
repository: spdx/spdx-3-model
ref: main
path: spdx-3-model
- name: Install pre-requisites
run: pip install -r spdx-spec/requirements.txt
- name: Install pre-requisites for spec-parser
run: pip install -r spec-parser/requirements.txt
- name: Build model
run: python3 spec-parser/main.py spdx-3-model/model spdx-spec/docs/model
- name: Copy JSON annotations
run: cp spdx-spec/serialization/jsonld/annotations.ttl spdx-spec/docs/model/jsonld-annotations.ttl
- name: Generate JSON schema
run: |
shacl2code generate \
--input spdx-spec/docs/model/spdx-model.ttl \
--input spdx-spec/docs/model/jsonld-annotations.ttl \
--context-url spdx-spec/docs/model/spdx-context.jsonld https://spdx.org/rdf/3.0.0/spdx-context.jsonld \
jsonschema \
--output spdx-spec/docs/model/schema.json
- name: Set git identity
run: git config user.name ci-bot; git config user.email [email protected]
working-directory: spdx-spec
- name: Sync gh-pages
run: git checkout gh-pages && git pull && git checkout development/v3.0
working-directory: spdx-spec
- name: Build docs
run: mike deploy v3.0 v3-draft -b gh-pages -p
working-directory: spdx-spec
47 changes: 47 additions & 0 deletions .github/workflows/validate_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
- pull_request
- push

jobs:
validate-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Install python dependencies
run: |
python3 -m pip install pyshacl==0.25.0 check-jsonschema==0.28.1
- name: Install dependencies
run: |
sudo apt install -y gawk
- name: Check files
run: |
set -e
for f in examples/jsonld/*.json; do
echo "Checking $f"
check-jsonschema \
-v \
--schemafile https://spdx.org/schema/3.0.0/spdx-json-schema.json \
$f
pyshacl \
-s https://spdx.org/rdf/3.0.0/spdx-model.ttl \
-e https://spdx.org/rdf/3.0.0/spdx-model.ttl \
$f
done
- name: Check documentation examples
run: |
for f in $(grep -l '```json' docs/annexes/*.md); do
echo "Checking $f"
cat $f | awk '/^```json/, $0=="```" {if ($0 !~ /^```.*/ ) print}' > temp.json
check-jsonschema \
-v \
--schemafile https://spdx.org/schema/3.0.0/spdx-json-schema.json \
temp.json
pyshacl \
-s https://spdx.org/rdf/3.0.0/spdx-model.ttl \
-e https://spdx.org/rdf/3.0.0/spdx-model.ttl \
temp.json
done
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## 3.0 (TBD)

* Refactored the build process and mkdocs process.

## 2.2 (2020-05-02)

* Added more relationship types to [Relationships](https://github.com/spdx/spdx-spec/blob/development/v2.2/chapters/7-relationships-between-SPDX-elements.md).
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
The SPDX specification is maintained by the SPDX [legal][spdx-legal] and [tech][spdx-tech] teams.
Design and planning is primarily done via the team [mailing][spdx-legal-list] [lists][spdx-tech-list] and meetings.

## Contribution License Agreement

Contributions to this repo are made pursuant to the [SPDX Community Specification Contributor License Agreement 1.0][cla]. You do not need to submit a signed copy of the contributor license agreement; by making a contribution to this repo, you agree to the terms set forth in that agreement.

## Submitting changes

Always write a clear log message for your commits. One-line messages are fine for small changes, but significant changes should look like this:
Expand Down Expand Up @@ -33,6 +37,7 @@ When submitting an issue or pull request, please add a suggested release milesto

If your issue or pull request is independent of a release, you can use the `release-independent` milestone.

[cla]: https://github.com/spdx/governance/blob/main/0._SPDX_Contributor_License_Agreement.md
[issues]: https://github.com/spdx/spdx-spec/issues/
[pull-requests]: https://github.com/spdx/spdx-spec/pulls/
[spdx-legal]: https://wiki.spdx.org/view/Legal_Team
Expand Down
Loading

0 comments on commit e35e26b

Please sign in to comment.