Skip to content

Commit

Permalink
Merge pull request #814 from github/minor-script-updates
Browse files Browse the repository at this point in the history
Update tag/release script
  • Loading branch information
felipesu19 authored Jan 18, 2022
2 parents de2f6b4 + 5363a36 commit c618208
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions script/release
Original file line number Diff line number Diff line change
@@ -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/*

0 comments on commit c618208

Please sign in to comment.