Skip to content

Commit

Permalink
update to use users.add file
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Feb 10, 2025
1 parent b53ecdd commit 408c848
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
18 changes: 16 additions & 2 deletions local-app/git-xargs/add-gpg-keys.edl.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
#!/bin/bash

VERSION="1.0.4"
VERSION="1.1.1"
LOGFILE="/tmp/git-xargs.$XARGS_REPO_NAME.$$.log"
THIS=$(basname $0 .sh)

exec 3>&1 4>&2
trap 'exec 2>&4 1>&3' 0 1 2 3
exec 1>$LOGFILE 2>&1

USERS="house343 rudd0009 sung0005 vora0002"
if [ -z "$1" ]
then
USERSFILE="$(pwd)/$THIS.users-add.txt"
else
USERSFILE="$1"
fi

if [ ! -r $USERSFILE ]
then
echo "* missing $USERSFILE"
exit 1
else
echo "* reading users from $USERSFILE"
USERS=$(cat $USERSFILE)
fi

echo "* starting $THIS v$VERSION at $(date)"
if [[ -d "init/git-secret" ]] && [[ -d ".gitsecret" ]]
Expand Down
1 change: 1 addition & 0 deletions local-app/git-xargs/add-gpg-keys.edl.users-add.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
naray007
22 changes: 20 additions & 2 deletions local-app/git-xargs/submit.add-gpg-keys.edl.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
#!/bin/bash

VERSION="1.1.1"
SCRIPT="$(pwd)/add-gpg-keys.edl.sh"
SCRIPTBASE=$(basename $SCRIPT .sh)
LOGFILE="$SCRIPTBASE.sh.$(date +%s).log"
USERSFILE="$(pwd)/$SCRIPTBASE.users-add.txt"
if [ ! -r $USERSFILE ]
then
echo "* missing $USERSFILE"
exit 1
else
echo "* reading users from $USERSFILE"
USERS=$(cat $USERSFILE)
fi

echo "* running $SCRIPT across all EDL repos for users $USERS, log in $LOGFILE"

GITHUB_HOSTNAME=github.e.it.census.gov GITHUB_OAUTH_TOKEN=ae2f950f5d628d665e6498bc699cdf24566bd94c git-xargs \
--branch-name master \
--skip-pull-requests \
--commit-message '[xargs] add gpg for user users' \
--commit-message "[xargs] add gpg for users $USERS" \
--no-skip-ci \
--repos tf-repo.edl.txt \
"$(pwd)/add-gpg-keys.edl.sh" |& tee add-gpg-keys.edl.sh.$(date +%s).log
"$SCRIPT" "$USERSFILE" |& tee $LOGFILE

0 comments on commit 408c848

Please sign in to comment.