You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/10/16 17:41:14 UTC

[GitHub] pritidesai closed pull request #52: Add helper scripts used to test mutiple github repos.

pritidesai closed pull request #52: Add helper scripts used to test mutiple github repos.
URL: https://github.com/apache/incubator-openwhisk-utilities/pull/52
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/scancode/utils/clone_all.sh b/scancode/utils/clone_all.sh
new file mode 100755
index 0000000..cc75383
--- /dev/null
+++ b/scancode/utils/clone_all.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+USAGE=$"USAGE: clone_all <repo-list.txt> <ORIGIN> <UPSTREAM>\n"
+
+if [ $1 ]
+then
+    if [ $2 ]
+    then
+        if [ $3 ]
+        then
+            while read fn; do
+                printf "cloning:" $fn
+                source ./repo_clone.sh $fn $2 $3
+            done < $1
+        else
+            printf "ERROR: Did not add Github fork name for UPSTREAM. Did not add REMOTE\n"
+            printf "$USAGE"
+            exit 3
+        fi
+    else
+        printf "ERROR: Argument not present: GitHub Organization Name\n"
+        printf "$USAGE"
+        exit 2
+    fi
+else
+    echo "ERROR: Argument not present: Repository Text listing (.txt)\n"
+    printf "$USAGE"
+    exit 1
+fi
diff --git a/scancode/utils/openwhisk-repos.txt b/scancode/utils/openwhisk-repos.txt
new file mode 100644
index 0000000..3076ff5
--- /dev/null
+++ b/scancode/utils/openwhisk-repos.txt
@@ -0,0 +1,49 @@
+incubator-openwhisk
+incubator-openwhisk-apigateway
+incubator-openwhisk-catalog
+incubator-openwhisk-cli
+incubator-openwhisk-client-go
+incubator-openwhisk-client-js
+incubator-openwhisk-client-python
+incubator-openwhisk-client-swift
+incubator-openwhisk-composer
+incubator-openwhisk-debugger
+incubator-openwhisk-deploy-kube
+incubator-openwhisk-deploy-mesos
+incubator-openwhisk-deploy-openshift
+incubator-openwhisk-devtools
+incubator-openwhisk-external-resources
+incubator-openwhisk-GitHubSlackBot
+incubator-openwhisk-package-alarms
+incubator-openwhisk-package-cloudant
+incubator-openwhisk-package-deploy
+incubator-openwhisk-package-jira
+incubator-openwhisk-package-kafka
+incubator-openwhisk-package-pushnotifications
+incubator-openwhisk-package-rss
+incubator-openwhisk-package-template
+incubator-openwhisk-playground
+incubator-openwhisk-podspecs
+incubator-openwhisk-release
+incubator-openwhisk-runtime-docker
+incubator-openwhisk-runtime-ballerina
+incubator-openwhisk-runtime-dotnet
+incubator-openwhisk-runtime-go
+incubator-openwhisk-runtime-java
+incubator-openwhisk-runtime-nodejs
+incubator-openwhisk-runtime-php
+incubator-openwhisk-runtime-python
+incubator-openwhisk-runtime-ruby
+incubator-openwhisk-runtime-swift
+incubator-openwhisk-sample-matos
+incubator-openwhisk-sample-slackbot
+incubator-openwhisk-selfserve-test
+incubator-openwhisk-slackinvite
+incubator-openwhisk-test
+incubator-openwhisk-tutorial
+incubator-openwhisk-utilities
+incubator-openwhisk-vscode
+incubator-openwhisk-website
+incubator-openwhisk-workshop
+incubator-openwhisk-wskdeploy
+incubator-openwhisk-xcode
diff --git a/scancode/utils/release-repos.txt b/scancode/utils/release-repos.txt
new file mode 100644
index 0000000..19ffd20
--- /dev/null
+++ b/scancode/utils/release-repos.txt
@@ -0,0 +1,13 @@
+incubator-openwhisk
+incubator-openwhisk-apigateway
+incubator-openwhisk-catalog
+incubator-openwhisk-cli
+incubator-openwhisk-client-go
+incubator-openwhisk-deploy-kube
+incubator-openwhisk-runtime-docker
+incubator-openwhisk-runtime-java
+incubator-openwhisk-runtime-nodejs
+incubator-openwhisk-runtime-php
+incubator-openwhisk-runtime-python
+incubator-openwhisk-runtime-swift
+incubator-openwhisk-wskdeploy
diff --git a/scancode/utils/repo_clone.sh b/scancode/utils/repo_clone.sh
new file mode 100755
index 0000000..8cd8873
--- /dev/null
+++ b/scancode/utils/repo_clone.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+USAGE="repo_clone <repo. name> <ORIGIN> <UPSTREAM>"
+
+if [ $1 ]
+then
+    : # $1 was given
+    REPO=$1
+
+    if [ $2 ]
+    then
+        :
+        OWNER=$2
+    else
+        echo "ERROR: Did not add Github fork name for ORIGIN."
+        echo $USAGE
+        exit 2
+    fi
+
+    echo "REPO=[$1]"
+    echo "OWNER=[$2]"
+
+    echo "Info: Cloning: git@github.com:$OWNER/$REPO ..."
+    git clone git@github.com:$OWNER/$REPO
+    echo "Info: Remotes: git remote"
+    git remote
+
+    if [ $3 ]
+    then
+        cd $REPO
+        echo "Info: Adding UPSTREAM remote: 'git remote add upstream git@github.com:$3/$REPO' ..."
+        git remote add upstream git@github.com:$3/$REPO
+        echo "Info: Fetching remotes: 'git fetch --all'  ..."
+        git fetch --all
+        echo "Info: Remotes: git remote"
+        git remote
+        cd ..
+    else
+        echo "INFO: Did not add Github fork name for UPSTREAM. Did not add REMOTE"
+    fi
+else
+    echo "ERROR: Argument not present: GitHub Repository Name"
+    echo $USAGE
+    exit 1
+fi
diff --git a/scancode/utils/scan_all.sh b/scancode/utils/scan_all.sh
new file mode 100755
index 0000000..aa5ba25
--- /dev/null
+++ b/scancode/utils/scan_all.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+if [ $1 ]
+then
+    while read fn; do
+        cd incubator-openwhisk-utilities
+        echo "scanning repo:" $fn
+        scancode/scanCode.py --config scancode/ASF-Release.cfg ../$fn
+        cd ..
+    done < $1
+else
+    echo "ERROR: Argument not present: Repository Text listing (.txt)"
+    exit 1
+fi
diff --git a/scancode/utils/update_all.sh b/scancode/utils/update_all.sh
new file mode 100755
index 0000000..6374e3e
--- /dev/null
+++ b/scancode/utils/update_all.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
+if [ $1 ]
+then
+    while read fn; do
+        echo "update-fork:" $fn
+        cd $fn
+        git update-fork
+        cd ..
+    done < $1
+else
+    echo "ERROR: Argument not present: Repository Text listing (.txt)"
+    exit 1
+fi


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services