From b54fc4291294e5504b785325e2f148da7fc82b6c Mon Sep 17 00:00:00 2001 From: Thalia Archibald Date: Wed, 23 Oct 2024 17:51:09 -0700 Subject: Link to linear history and tag chapters --- .github/workflows/linearize.sh | 4 ++++ .github/workflows/linearize.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to '.github') 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 }} -- cgit v1.2.3