aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-01-09 10:55:03 +0100
committerCharles <sircharlesaze@gmail.com>2020-01-09 13:09:38 +0100
commit04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa (patch)
tree5c691241355c943a3c68ddb06b8cf8c60aa11319 /srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci
parent7e0d85db834d6351ed85d01e5126ac31dc510b86 (diff)
downloadft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.tar.gz
ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.tar.bz2
ft_server-04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa.zip
phpmyadmin working
Diffstat (limited to 'srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci')
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/changelog.sh4
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-cron.sh65
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-lint.sh14
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-mocha.sh5
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpcs.sh4
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpcsbf.sh4
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpstan.sh4
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpunit.sh4
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/install-reporters.sh27
-rwxr-xr-xsrcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/install.sh4
10 files changed, 135 insertions, 0 deletions
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/changelog.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/changelog.sh
new file mode 100755
index 0000000..937daa7
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/changelog.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+npm install --only=dev
+npm run changelog-file
+git diff --no-prefix CHANGELOG.md
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-cron.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-cron.sh
new file mode 100755
index 0000000..1278745
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-cron.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then
+ echo "Not a travis cron !";
+ exit 1;
+fi
+
+if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+ echo "Not a travis cron !";
+ exit 1;
+fi
+
+therealpath ()
+{
+ f=$@;
+ if [ -d "$f" ]; then
+ base="";
+ dir="$f";
+ else
+ base="/$(basename "$f")";
+ dir=$(dirname "$f");
+ fi;
+ dir=$(cd "$dir" && /bin/pwd);
+ echo "$dir$base"
+}
+
+
+ME="$(dirname $0)"
+
+BOT_DIR_FILES="$(therealpath $ME/../sudo-bot)"
+REPO_DIR="$(therealpath $ME/../../)"
+
+echo "BOT_DIR_FILES = $BOT_DIR_FILES"
+echo "REPO_DIR = $REPO_DIR"
+
+REPO="mariadb-mysql-kbs"
+OWNER="williamdes"
+
+
+#INSTALLATION_ID="123456"
+JWT_PRIV_KEY_PATH="$BOT_DIR_FILES/sudo.2018-09-12.private-key.pem"
+GPG_PRIV_PATH="$BOT_DIR_FILES/privkey.asc"
+GPG_PUB_PATH="$BOT_DIR_FILES/pubkey.asc"
+#GPG_PRIV_PASSWORD="gpgPasswordHere"
+
+BOT_NAME="Sudo Bot"
+BOT_EMAIL="sudo-bot@wdes.fr"
+
+echo "Create env file"
+
+echo -e "JWT_PRIV_KEY_PATH=$JWT_PRIV_KEY_PATH\nGPG_PRIV_PATH=$GPG_PRIV_PATH\nGPG_PUB_PATH=$GPG_PUB_PATH\nGPG_PRIV_PASSWORD=$GPG_PRIV_PASSWORD\nREPO=$REPO\nOWNER=$OWNER\nASSIGN_USERS=williamdes\nAPP_ID=17453\nINSTALLATION_ID=$INSTALLATION_ID\nBOT_NAME=$BOT_NAME\nBOT_EMAIL=$BOT_EMAIL\nREPO_DIR=$REPO_DIR\nDOT_IGNORE=$BOT_DIR_FILES/.sudobotignore\nTEMPLATE_FILE=$BOT_DIR_FILES/template.js" > $BOT_DIR_FILES/.env
+
+
+cd $REPO_DIR
+
+echo "Run nodejs scripts"
+npm run build
+
+echo "Run merge script"
+composer run build
+
+echo "Run sudo-bot"
+
+npm run sudo-bot-pr
+
+rm -f $BOT_DIR_FILES/.env
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-lint.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-lint.sh
new file mode 100755
index 0000000..e9ac666
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-lint.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+cd $(dirname $0)/../../
+echo "Running in : $(pwd)"
+echo "Running jshint"
+npm run jshint -- --verbose
+JSHINT=$?
+echo "Running prettier"
+npm run prettier -- --list-different
+PRETTIER=$?
+
+if [[ $JSHINT != 0 ]] || [[ $PRETTIER != 0 ]]; then
+ echo "You have some errors to fix !";
+ exit 1;
+fi
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-mocha.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-mocha.sh
new file mode 100755
index 0000000..117d9d7
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-mocha.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+cd $(dirname $0)/../../
+echo "Running in : $(pwd)"
+npm run test
+npm run report-coverage
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpcs.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpcs.sh
new file mode 100755
index 0000000..b197cfd
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpcs.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+cd $(dirname $0)/../../
+echo "Running in : $(pwd)"
+composer run phpcs
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpcsbf.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpcsbf.sh
new file mode 100755
index 0000000..4c70600
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpcsbf.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+cd $(dirname $0)/../../
+echo "Running in : $(pwd)"
+composer run phpcbf
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpstan.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpstan.sh
new file mode 100755
index 0000000..a69d006
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpstan.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+cd $(dirname $0)/../../
+echo "Running in : $(pwd)"
+composer run phpstan
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpunit.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpunit.sh
new file mode 100755
index 0000000..33b6f94
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/ci-phpunit.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+cd $(dirname $0)/../../
+echo "Running in : $(pwd)"
+composer run test
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/install-reporters.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/install-reporters.sh
new file mode 100755
index 0000000..19befa5
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/install-reporters.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+therealpath ()
+{
+ f=$@;
+ if [ -d "$f" ]; then
+ base="";
+ dir="$f";
+ else
+ base="/$(basename "$f")";
+ dir=$(dirname "$f");
+ fi;
+ dir=$(cd "$dir" && /bin/pwd);
+ echo "$dir$base"
+}
+ME="$(therealpath $(dirname $0))"
+echo "I am in : $ME"
+mkdir -p "$HOME/.cache/ci"
+cd "$HOME/.cache/ci"
+CODACY_LATEST_PHAR=$(curl -s https://api.github.com/repos/codacy/php-codacy-coverage/releases/latest | grep browser_download_url | cut -d '"' -f 4)
+echo "CODACY_LATEST_PHAR: $CODACY_LATEST_PHAR"
+wget --timestamping "$CODACY_LATEST_PHAR"
+
+cp "$HOME/.cache/ci/codacy-coverage.phar" "$ME/../../codacy-coverage.phar"
+
+chmod +x "$ME/../../codacy-coverage.phar"
+
+cd "$ME/../../"
diff --git a/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/install.sh b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/install.sh
new file mode 100755
index 0000000..682237e
--- /dev/null
+++ b/srcs/phpmyadmin/vendor/williamdes/mariadb-mysql-kbs/scripts/ci/install.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+export PATH=~/.composer/vendor/bin/:$PATH
+set -x
+set -e