Skip to content

Commit

Permalink
Receive github user parameters
Browse files Browse the repository at this point in the history
From git config, instead of CLI input.
  • Loading branch information
pallavisontakke committed Aug 6, 2024
1 parent 1fa08f9 commit 67fb16e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
4 changes: 3 additions & 1 deletion scripts/release/create_release_PR_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ SOURCES_DIR="sources"

CHANGELOG_HEADER_LINES="6"

FORK_DIR="GH_USERNAME-timescaledb"
GH_USERNAME=$(gh auth status | grep 'Logged in to' |cut -d ' ' -f 9)

FORK_DIR="$GH_USERNAME-timescaledb"

echo "---- Deriving the release related versions from main ----"

Expand Down
16 changes: 4 additions & 12 deletions scripts/release/ready_fork_for_commit.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
#!/bin/bash
set -eu


args=("$@")

# GITHUB_USERNAMES
GH_EMAIL="$1"
GH_USERNAME="$2"
GH_FULL_USERNAME="$3"
GH_EMAIL=$(git config user.email)
GH_FULL_USERNAME=$(git config user.name)
GH_USERNAME=$(gh auth status | grep 'Logged in to' |cut -d ' ' -f 9)

echo "GH_EMAIL is $GH_EMAIL"
echo "GH_USERNAME is $GH_USERNAME"
echo "GH_FULL_USERNAME is $GH_FULL_USERNAME"
echo "GH_USERNAME is $GH_USERNAME"

# Folder, where we have cloned repositories' sources
SOURCES_DIR="sources"

# Derived Variables
FORK_DIR="$GH_USERNAME-timescaledb"
PWD=$(pwd)
SCRIPTS_DIR="$PWD"

echo "---- Updating fork with upstream for user $GH_USERNAME ----"

Expand Down Expand Up @@ -53,6 +48,3 @@ git push --tags origin main
# Check the needed branch name here - could it be 2.14.x ?
# git push -f --tags origin main

cd "$SCRIPTS_DIR"
sed -i.bak "s/GH_USERNAME/"$GH_USERNAME"/g" create_release_PR_commit.sh
rm create_release_PR_commit.sh.bak

0 comments on commit 67fb16e

Please sign in to comment.