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

Update tag/release script #814

Merged
merged 1 commit into from Jan 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 11 additions & 11 deletions script/release
@@ -1,13 +1,13 @@
#!/bin/sh

# check that gh is installed and logged in

gh auth status -h github.com

# Tag and push a release.

set -e

# check that gh is installed and logged in

gh auth status -h github.com

# Make sure we're in the project root.

cd $(dirname "$0")/..
Expand Down Expand Up @@ -56,8 +56,8 @@ mkdir -p tmp
#for each dependent repo, create a new branch an a blank pr.
# first get the sha of main for each repo

gh_pages_sha = gh api repos/github/pages/git/refs/heads/master | jq '. | .object.sha'
jekyll_sha = gh api repos/actions/jekyll-build-pages/git/refs/heads/main | jq '. | .object.sha'
gh_pages_sha=`gh api repos/github/pages/git/refs/heads/master | jq '. | .object.sha'`
jekyll_sha=`gh api repos/actions/jekyll-build-pages/git/refs/heads/main | jq '. | .object.sha'`

# then create the branches

Expand All @@ -66,8 +66,8 @@ gh api repos/github/pages/git/refs -F "sha"="$jekyll_sha" -F "ref"="refs/heads/p

#then we need the tree object so we can create a commit using the api

gh_pages_tree = gh api repos/github/pages/git/commits/$gh_pages_sha | jq '. | .tree.sha'
jekyll_tree = gh api repos/github/actions/jekyll-build-pages/commits/$jekyll_sha | jq '. | .tree.sha'
gh_pages_tree=`gh api repos/github/pages/git/commits/$gh_pages_sha | jq '. | .tree.sha'`
jekyll_tree=`gh api repos/github/actions/jekyll-build-pages/commits/$jekyll_sha | jq '. | .tree.sha'`

# create the input file for the commit. We have to do this because the F flag doesn't support arrays

Expand All @@ -76,8 +76,8 @@ echo "{\"tree\": \"$jekyll_tree\", \"parents\": [\"$jekyll_sha\"], \"message\":

# create the commit

new_gh_pages_sha = gh api repos/github/pages/git/commits --input tmp/gh_pages_commit_input.json | jq '. | .sha'
new_jekyll_sha = gh api repos/actions/jekyll-build-pages/git/commits --input tmp/jekyll_commit_input.json | jq '. | .sha'
new_gh_pages_sha=`gh api repos/github/pages/git/commits --input tmp/gh_pages_commit_input.json | jq '. | .sha'`
new_jekyll_sha=`gh api repos/actions/jekyll-build-pages/git/commits --input tmp/jekyll_commit_input.json | jq '. | .sha'`

# associate the commit with the branch

Expand All @@ -90,4 +90,4 @@ gh pr create --base "main" --head "pages-gem-release-$tag" --title "Bump pages-

# clean up the input file for the commit

rm tmp/*
rm tmp/*