github.com/vipernet-xyz/tendermint-core@v0.32.0/scripts/release_management/github-public-newbranch.bash (about)

     1  #!/bin/sh
     2  
     3  # github-public-newbranch.bash - create public branch from the security repository
     4  
     5  set -euo pipefail
     6  
     7  # Create new branch
     8  BRANCH="${CIRCLE_TAG:-v0.0.0}-security-`date -u +%Y%m%d%H%M%S`"
     9  # Check if the patch release exist already as a branch
    10  if [ -n "`git branch | grep '${BRANCH}'`" ]; then
    11    echo "WARNING: Branch ${BRANCH} already exists."
    12  else
    13    echo "Creating branch ${BRANCH}."
    14    git branch "${BRANCH}"
    15  fi
    16  
    17  # ... and check it out
    18  git checkout "${BRANCH}"
    19  
    20  # Add entry to public repository
    21  git remote add tendermint-origin git@github.com:tendermint/tendermint.git
    22  
    23  # Push branch and tag to public repository
    24  git push tendermint-origin
    25  git push tendermint-origin --tags
    26  
    27  # Create a PR from the public branch to the assumed release branch in public (release branch has to exist)
    28  python -u scripts/release_management/github-openpr.py --head "${BRANCH}" --base "${BRANCH:%.*}"