diff options
| author | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-11 21:17:31 +0000 |
|---|---|---|
| committer | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-11 21:17:31 +0000 |
| commit | 7ad6c3ec641d0b89d072dc9b32202aebb8ecaf8d (patch) | |
| tree | 5fb6d8efebb4b664c59180f61e975289bbab9388 /utils | |
| parent | 8b88da364f7ba1988532bdfa4ecf09adc5c80ed6 (diff) | |
Remove assorted unused stuff.
Diffstat (limited to 'utils')
| -rwxr-xr-x | utils/autoMergeRequest.sh | 35 | ||||
| -rwxr-xr-x | utils/phpstan-watcher.sh | 23 | ||||
| -rwxr-xr-x | utils/phpunit-integration.sh | 7 | ||||
| -rwxr-xr-x | utils/phpunit.sh | 7 |
4 files changed, 0 insertions, 72 deletions
diff --git a/utils/autoMergeRequest.sh b/utils/autoMergeRequest.sh deleted file mode 100755 index bd33db0ca..000000000 --- a/utils/autoMergeRequest.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# Extract the host where the server is running, and add the URL to the APIs -[[ $HOST =~ ^https?://[^/]+ ]] && HOST="${BASH_REMATCH[0]}/api/v4/projects/" - -# Look which is the default branch -TARGET_BRANCH=`curl --silent "${HOST}${CI_PROJECT_ID}" --header "PRIVATE-TOKEN:${PRIVATE_TOKEN}" | python3 -c "import sys, json; print(json.load(sys.stdin)['default_branch'])"`; - -# The description of our new MR, we want to remove the branch after the MR has -# been closed -BODY="{ - \"id\": ${CI_PROJECT_ID}, - \"source_branch\": \"${CI_COMMIT_REF_NAME}\", - \"target_branch\": \"${TARGET_BRANCH}\", - \"remove_source_branch\": true, - \"title\": \"WIP: ${CI_COMMIT_REF_NAME}\", - \"assignee_id\":\"${GITLAB_USER_ID}\" -}"; - -# Require a list of all the merge request and take a look if there is already -# one with the same source branch -LISTMR=`curl --silent "${HOST}${CI_PROJECT_ID}/merge_requests?state=opened" --header "PRIVATE-TOKEN:${PRIVATE_TOKEN}"`; -COUNTBRANCHES=`echo ${LISTMR} | grep -o "\"source_branch\":\"${CI_COMMIT_REF_NAME}\"" | wc -l`; - -# No MR found, let's create a new one -if [ ${COUNTBRANCHES} -eq "0" ]; then - curl -X POST "${HOST}${CI_PROJECT_ID}/merge_requests" \ - --header "PRIVATE-TOKEN:${PRIVATE_TOKEN}" \ - --header "Content-Type: application/json" \ - --data "${BODY}"; - - echo "Opened a new merge request: WIP: ${CI_COMMIT_REF_NAME} and assigned to you"; - exit; -fi - -echo "No new merge request opened"; diff --git a/utils/phpstan-watcher.sh b/utils/phpstan-watcher.sh deleted file mode 100755 index 84554e68d..000000000 --- a/utils/phpstan-watcher.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -export PHP_IMAGE=registry.fakecake.org/infra/php8.4-alpine3.22 - -docker run --rm -v $(pwd):/app -v /tmp/phpstan:/tmp/phpstan \ - --workdir /app ${PHP_IMAGE} \ - php84 -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G --error-format=raw analyze . - -echo All done, RC=$?. - -while true; do - inotifywait . -e close_write -r -t 300 | grep -q .php && \ - ( - MODIFIED=$(git ls-files -m | grep .php) - - docker run --rm -v $(pwd):/app -v /tmp/phpstan:/tmp/phpstan \ - --workdir /app ${PHP_IMAGE} \ - php84 -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G --error-format=raw analyze . - - echo All done, RC=$?. - ) - sleep 1 -done diff --git a/utils/phpunit-integration.sh b/utils/phpunit-integration.sh deleted file mode 100755 index 7ce458cf8..000000000 --- a/utils/phpunit-integration.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -export PHP_IMAGE=registry.fakecake.org/infra/php8.3-alpine3.20 - -docker run --rm -v $(pwd):/app -e API_URL=${API_URL} \ - --workdir /app ${PHP_IMAGE} \ - php83 -d memory_limit=-1 ./vendor/bin/phpunit --group integration diff --git a/utils/phpunit.sh b/utils/phpunit.sh deleted file mode 100755 index 667ff92f5..000000000 --- a/utils/phpunit.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -export PHP_IMAGE=registry.fakecake.org/infra/php8.3-alpine3.20 - -docker run --rm -v $(pwd):/app \ - --workdir /app ${PHP_IMAGE} \ - php83 -d memory_limit=-1 ./vendor/bin/phpunit --exclude integration |