Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/review-replace-urls')
-rwxr-xr-xscripts/review-replace-urls4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/review-replace-urls b/scripts/review-replace-urls
new file mode 100755
index 00000000..f78e8324
--- /dev/null
+++ b/scripts/review-replace-urls
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+# Note this uses linux-specific (GNU) find syntax, it does not work with MacOS (BSD) find syntax because of the usage of the 'regextype' flag (and possibly other reasons)
+find public/ -type f -regextype egrep -iregex ".*\.(html|js|css|json|xml|txt)" -exec sed --in-place "s#https\?://docs.gitlab.com#https://$CI_COMMIT_REF_SLUG.docs.gitlab-review.app#g" "{}" +;