Skip to content

Commit 275a05c

Browse files
authored
feat: release per version (#117)
* feat: release per version * fix: bring back contexts
1 parent 2b463fc commit 275a05c

File tree

5 files changed

+68
-27
lines changed

5 files changed

+68
-27
lines changed

.github/scripts/checkout-tags.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
set -e
3+
4+
mkdir -p HEAD
5+
git fetch --all --tags
6+
tags_string=$(git tag)
7+
echo got tag string
8+
echo $tags_string
9+
tags_array=($tags_string)
10+
mv $(ls --ignore=HEAD) HEAD/
11+
for tag in "${tags_array[@]}"
12+
do
13+
echo starting with tag $tag
14+
mkdir $tag
15+
cd $tag
16+
git clone https://github.com/eclipse-dataspace-protocol-base/DataspaceProtocl.git --depth 1 --branch ${tag} --quiet
17+
mv ./DataspaceProtocol/* .
18+
cd ..
19+
done
20+
for dir in */; do
21+
echo "$dir"
22+
pwd
23+
ls -l
24+
if [ -f "$dir/index.html" ]; then
25+
cd "$dir/artifacts"
26+
./gradlew build
27+
./gradlew generateTablesFromSchemas
28+
cd ..
29+
pwd
30+
mkdir ./figures
31+
mkdir -p ./message/schema
32+
mkdir -p ./message/example
33+
mkdir -p ./message/table
34+
cp -r ./artifacts/src/main/resources/**/*-schema.json ./message/schema
35+
echo "successfully copied message schemas"
36+
cp -r ./artifacts/src/main/resources/context/*.jsonld ./message/schema
37+
echo "successfully copied jsonld contexts"
38+
cp -r ./artifacts/src/main/resources/**/example/*.json ./message/example
39+
echo "successfully copied message examples"
40+
cp -r ./specifications/**/figures/*.png ./figures/
41+
echo "successfully copied figures"
42+
cp -r ./artifacts/build/generated/tables/*.html ./message/table
43+
echo "successfully copied message property tables"
44+
cd ..
45+
else
46+
echo "index does not exist. No copy operations"
47+
fi
48+
done

.github/scripts/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE HTML>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="refresh"
6+
content="0;url=https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/HEAD"/>
7+
<link rel="canonical" href="https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/HEAD"/>
8+
</head>
9+
<body>
10+
<h4>
11+
This redirects to the latest Release Candidate <a href="https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/HEAD">here</a>
12+
</h4>
13+
</body>
14+
</html>

.github/workflows/autopublish.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616
- uses: ./.github/actions/setup-java
17-
- name: build java
18-
run: |
19-
cd artifacts
20-
./gradlew build
21-
./gradlew generateTablesFromSchemas
22-
cd ..
2317
- name: Copy files for correct web access
2418
run: |
25-
chmod +x ./.github/workflows/script.sh
26-
./.github/workflows/script.sh
19+
chmod +x ./.github/scripts/checkout-tags.sh
20+
./.github/scripts/checkout-tags.sh
21+
- name: Redirect top to head
22+
run: cp .github/scripts/index.html .
2723
- uses: actions/upload-pages-artifact@v3
2824
with:
2925
path: .

.github/workflows/script.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
/message
2323
/2024-1
2424
/v0.8
25-
/figures
25+
/figures
26+
/HEAD

0 commit comments

Comments
 (0)