Skip to content

Commit

Permalink
Modified checkgithistory to accept parameters and fixed typos in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
falfab committed Nov 4, 2021
1 parent 5b806ba commit f850667
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .ci/checkgithistory.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/bin/sh
set -e

# the script checks if the public repo and the local repo commit history are sync, otherwise it fails
if [ $# -ne 2 ]; then
>&2 echo "Not enough argument supplied. Usage: checkgithistory.sh public_url develop_branch_name"
exit 1
fi

# the script check if the public repo and the local repo commit history are sync, otherwise it fail
cd src/franka_ros
public_url="https://github.com/frankaemika/franka_ros.git"
public_url=$1
public_remote_name=$(git remote -v | grep ${public_url} | head -n 1 | sed -e 's/\s.*$//')
develop_branch_name="develop"
develop_branch_name=$2

if [ -z "$public_remote_name" ]; then
public_remote_name="public"
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ node ('docker'){
}
stage("Check public/local commit history sync") {
sh """
src/franka_ros/.ci/checkgithistory.sh
src/franka_ros/.ci/checkgithistory.sh https://github.com/frankaemika/franka_ros.git develop
"""
}
} catch (e) {
Expand Down

0 comments on commit f850667

Please sign in to comment.