Files
studio/docs/check_outdated.sh
ozan 920b21f377
Build & Deploy Docs / deploy (push) Failing after 1m35s
feat: add Docusaurus docs site to monorepo (forked from gitea/docs)
Full copy of Gitea's official docs (Docusaurus + Redocusaurus for API).
All original content preserved — Tinqs docs added alongside under docs/tinqs/.

Added:
- docs/docs/tinqs/getting-started.md — CLI install, login, migrate, agent setup
- docs/docs/tinqs/cli.md — full tstudio CLI reference
- deploy-docs.yml — builds Docusaurus, deploys to S3 for docs.tinqs.com

Branding handoff written for branding agent to rebrand config, logos, colors.
Shares monorepo version — one repo, one version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 10:19:50 +01:00

38 lines
1.1 KiB
Bash

#!/bin/bash
# This script takes `locale` as a param and checks if a specific locale version of document is up to date with English version
# If latest commit timestamp of English version is greater than the specific locale version,
# The specific locale version document will be marked as outdated
set -xe
SED_INPLACE() {
if sed --version 2>/dev/null | grep -q GNU; then
sed -i "$@"
else
sed -i '' "$@"
fi
}
locale="$1"
cur_path=`pwd`
cd .tmp/upstream-docs
for file in `find ./docs/content -name "*.${locale}.md"`; do
file_en="${file/.${locale}/.en-us}"
if [ ! -f "$file_en" ]; then
continue
fi
latest_commit_time_en=$(git log -1 --format=%ct "$file_en")
latest_commit_time_locale=$(git log -1 --format=%ct "$file")
if [ -z "$latest_commit_time_locale" ]; then
continue
fi
if [[ "$latest_commit_time_en" -gt "$latest_commit_time_locale" ]]; then
echo "file: $file, lastest commit timestamp: $latest_commit_time_en (en ver), $latest_commit_time_locale ($locale ver)"
SED_INPLACE '1s/---/---\nisOutdated: true/' $file
fi
done
cd "$cur_path"