diff options
| author | Thalia Archibald <thalia@archibald.dev> | 2024-10-23 17:51:09 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2024-10-23 23:21:07 -0700 |
| commit | b54fc4291294e5504b785325e2f148da7fc82b6c (patch) | |
| tree | 4db65eb6726d92ad8c8d1b8ea9ae5dd260d0ff07 /.github/workflows | |
| parent | f38d1d3c3c4c62dac6c64b44bc86f561602620b2 (diff) | |
| download | Simple-b54fc4291294e5504b785325e2f148da7fc82b6c.tar.gz Simple-b54fc4291294e5504b785325e2f148da7fc82b6c.zip | |
Link to linear history and tag chapters
Diffstat (limited to '.github/workflows')
| -rwxr-xr-x | .github/workflows/linearize.sh | 4 | ||||
| -rw-r--r-- | .github/workflows/linearize.yml | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/.github/workflows/linearize.sh b/.github/workflows/linearize.sh index 07f22b08..36dfa50d 100755 --- a/.github/workflows/linearize.sh +++ b/.github/workflows/linearize.sh @@ -90,6 +90,7 @@ while read -r chapter; do sed -Ei 's,\bdocs/,,' "docs/$chapter/README.md" git add README.md "docs/$chapter/README.md" pom.xml + # Create a commit for the chapter, using the metadata. if [[ ! "$first_author" =~ ^(.*)\ \<(.*)\>$ ]]; then echo "First author does not match pattern" >&2 exit 1 @@ -99,4 +100,7 @@ while read -r chapter; do GIT_AUTHOR_NAME="$name" GIT_AUTHOR_EMAIL="$email" GIT_AUTHOR_DATE="$author_date" \ GIT_COMMITTER_NAME="$name" GIT_COMMITTER_EMAIL="$email" GIT_COMMITTER_DATE="$committer_date" \ git commit -q -m "$message" + + # Tag the chapter, so it can be stably linked. + git tag "linear-$chapter" done diff --git a/.github/workflows/linearize.yml b/.github/workflows/linearize.yml index 76345f4c..a5bbe400 100644 --- a/.github/workflows/linearize.yml +++ b/.github/workflows/linearize.yml @@ -23,6 +23,6 @@ jobs: git fetch linear git checkout -b linear linear/main git remote remove linear - git push -f origin linear + git push -f origin refs/heads/linear 'refs/tags/linear-chapter*' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
