snapshot of https://github.com/ory/kratos.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
CI / Run tests and lints (push) Failing after 29s
CI / Build CLI docs (push) Has been skipped
CI / Run Playwright end-to-end tests (mysql) (push) Failing after 3s
CI / Run Playwright end-to-end tests (postgres) (push) Failing after 2s
CI / Run Playwright end-to-end tests (sqlite) (push) Failing after 3s
CodeQL / Analyze (go) (push) Failing after 4s
CodeQL / Analyze (javascript) (push) Failing after 3s
Docker Image Scanners / scanners (push) Failing after 4s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Run end-to-end tests (postgres) (push) Failing after 19s
CI / Run end-to-end tests (sqlite) (push) Failing after 2s
CI / Run Playwright end-to-end tests (cockroach) (push) Failing after 2s
CI / Draft newsletter (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
Some checks failed
CI / Run tests and lints (push) Failing after 29s
CI / Build CLI docs (push) Has been skipped
CI / Run Playwright end-to-end tests (mysql) (push) Failing after 3s
CI / Run Playwright end-to-end tests (postgres) (push) Failing after 2s
CI / Run Playwright end-to-end tests (sqlite) (push) Failing after 3s
CodeQL / Analyze (go) (push) Failing after 4s
CodeQL / Analyze (javascript) (push) Failing after 3s
Docker Image Scanners / scanners (push) Failing after 4s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Run end-to-end tests (postgres) (push) Failing after 19s
CI / Run end-to-end tests (sqlite) (push) Failing after 2s
CI / Run Playwright end-to-end tests (cockroach) (push) Failing after 2s
CI / Draft newsletter (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
This commit is contained in:
75
script/debug-entrypoint.sh
Executable file
75
script/debug-entrypoint.sh
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
FILE_CHANGE_LOG_FILE=/tmp/changes.log
|
||||
SERVICE_ARGS="$@"
|
||||
|
||||
log() {
|
||||
echo "***** $1 *****"
|
||||
}
|
||||
|
||||
init() {
|
||||
log "Initializing"
|
||||
truncate -s 0 ${FILE_CHANGE_LOG_FILE}
|
||||
tail -f ${FILE_CHANGE_LOG_FILE} &
|
||||
}
|
||||
|
||||
build() {
|
||||
log "Building ${SERVICE_NAME} binary"
|
||||
go env -w GOPROXY="proxy.golang.org,direct"
|
||||
go mod download
|
||||
go build -buildvcs=false -gcflags "all=-N -l" -o /${SERVICE_NAME}
|
||||
}
|
||||
|
||||
start() {
|
||||
log "Starting Delve"
|
||||
dlv --listen=:${DELVE_PORT} --headless=true --api-version=2 --accept-multiclient exec /${SERVICE_NAME} -- ${SERVICE_ARGS} &
|
||||
}
|
||||
|
||||
restart() {
|
||||
build
|
||||
|
||||
log "Killing old processes"
|
||||
killall dlv
|
||||
killall ${SERVICE_NAME}
|
||||
|
||||
start
|
||||
}
|
||||
|
||||
watch() {
|
||||
log "Watching for changes"
|
||||
inotifywait -e "MODIFY,DELETE,MOVED_TO,MOVED_FROM" -m -r ${PWD} | (
|
||||
while true; do
|
||||
read path action file
|
||||
ext=${file: -3}
|
||||
if [[ "$ext" == ".go" ]]; then
|
||||
echo "$file"
|
||||
fi
|
||||
done
|
||||
) | (
|
||||
WAITING=""
|
||||
while true; do
|
||||
file=""
|
||||
read -t 1 file
|
||||
if test -z "$file"; then
|
||||
if test ! -z "$WAITING"; then
|
||||
echo "CHANGED"
|
||||
WAITING=""
|
||||
fi
|
||||
else
|
||||
log "File ${file} changed" >> ${FILE_CHANGE_LOG_FILE}
|
||||
WAITING=1
|
||||
fi
|
||||
done
|
||||
) | (
|
||||
while true; do
|
||||
read TMP
|
||||
restart
|
||||
done
|
||||
)
|
||||
}
|
||||
|
||||
# main part
|
||||
init
|
||||
build
|
||||
start
|
||||
watch
|
||||
Reference in New Issue
Block a user