Skip to content
代码片段 群组 项目
提交 c7c693f0 编辑于 作者: Nao Hashizume's avatar Nao Hashizume
浏览文件

Add asdf-install target for gitlab-pages

上级 e8e695db
No related branches found
No related tags found
无相关合并请求
...@@ -13,8 +13,6 @@ gitleaks 8.16.4 ...@@ -13,8 +13,6 @@ gitleaks 8.16.4
# 1.21.5: # 1.21.5:
# - https://gitlab.com/gitlab-org/gitlab/-/raw/master/workhorse/.tool-versions # - https://gitlab.com/gitlab-org/gitlab/-/raw/master/workhorse/.tool-versions
# 1.21.4: # 1.21.4:
# - https://gitlab.com/gitlab-org/gitlab-pages/-/raw/master/.tool-versions
# - https://gitlab.com/gitlab-org/gitlab-pages -> https://gitlab.com/gitlab-org/gitlab/-/raw/master/GITLAB_PAGES_VERSION
# - https://gitlab.com/gitlab-org/gitaly/-/raw/master/.tool-versions # - https://gitlab.com/gitlab-org/gitaly/-/raw/master/.tool-versions
# - https://gitlab.com/gitlab-org/gitaly -> https://gitlab.com/gitlab-org/gitlab/-/raw/master/GITALY_SERVER_VERSION # - https://gitlab.com/gitlab-org/gitaly -> https://gitlab.com/gitlab-org/gitlab/-/raw/master/GITALY_SERVER_VERSION
# - https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/raw/main/.tool-versions # - https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/raw/main/.tool-versions
......
...@@ -13,7 +13,6 @@ FileNotFoundError = Class.new(StandardError) ...@@ -13,7 +13,6 @@ FileNotFoundError = Class.new(StandardError)
GITLAB_ORG_URL = 'https://gitlab.com/gitlab-org' GITLAB_ORG_URL = 'https://gitlab.com/gitlab-org'
GITLAB_URL = "#{GITLAB_ORG_URL}/gitlab".freeze GITLAB_URL = "#{GITLAB_ORG_URL}/gitlab".freeze
GITLAB_PAGES_URL = "#{GITLAB_ORG_URL}/gitlab-pages".freeze
GITALY_URL = "#{GITLAB_ORG_URL}/gitaly".freeze GITALY_URL = "#{GITLAB_ORG_URL}/gitaly".freeze
GITLAB_RUNNER_URL = "#{GITLAB_ORG_URL}/gitlab-runner".freeze GITLAB_RUNNER_URL = "#{GITLAB_ORG_URL}/gitlab-runner".freeze
GITLAB_UI_URL = "#{GITLAB_ORG_URL}/gitlab-ui".freeze GITLAB_UI_URL = "#{GITLAB_ORG_URL}/gitlab-ui".freeze
...@@ -173,8 +172,6 @@ end ...@@ -173,8 +172,6 @@ end
tool_versions_files = [ tool_versions_files = [
RemoteToolVersionFile.new(GITLAB_URL), RemoteToolVersionFile.new(GITLAB_URL),
RemoteToolVersionFile.new(GITLAB_URL, path: 'workhorse'), RemoteToolVersionFile.new(GITLAB_URL, path: 'workhorse'),
RemoteToolVersionFile.new(GITLAB_PAGES_URL),
RemoteToolVersionFile.new(GITLAB_PAGES_URL, ref: ref_from_remote_file_for_gitlab_project('GITLAB_PAGES_VERSION'), label_ref: url_for_remote_file_for_gitlab_project('GITLAB_PAGES_VERSION')),
RemoteToolVersionFile.new(GITALY_URL), RemoteToolVersionFile.new(GITALY_URL),
RemoteToolVersionFile.new(GITALY_URL, ref: ref_from_remote_file_for_gitlab_project('GITALY_SERVER_VERSION'), label_ref: url_for_remote_file_for_gitlab_project('GITALY_SERVER_VERSION')), RemoteToolVersionFile.new(GITALY_URL, ref: ref_from_remote_file_for_gitlab_project('GITALY_SERVER_VERSION'), label_ref: url_for_remote_file_for_gitlab_project('GITALY_SERVER_VERSION')),
RemoteToolVersionFile.new(GITLAB_RUNNER_URL, ref: 'main'), RemoteToolVersionFile.new(GITLAB_RUNNER_URL, ref: 'main'),
......
gitlab_pages_clone_dir = gitlab-pages gitlab_pages_dir = ${gitlab_development_root}/gitlab-pages
gitlab_pages_version = $(shell support/resolve-dependency-commitish "${gitlab_development_root}/gitlab/GITLAB_PAGES_VERSION") gitlab_pages_version = $(shell support/resolve-dependency-commitish "${gitlab_development_root}/gitlab/GITLAB_PAGES_VERSION")
ifeq ($(gitlab_pages_enabled),true) ifeq ($(gitlab_pages_enabled),true)
...@@ -18,21 +18,33 @@ endif ...@@ -18,21 +18,33 @@ endif
.PHONY: gitlab-pages-update-run .PHONY: gitlab-pages-update-run
gitlab-pages-update-run: gitlab-pages-secret gitlab-pages/gitlab-pages.conf gitlab-pages/bin/gitlab-pages gitlab-pages-update-run: gitlab-pages-secret gitlab-pages/gitlab-pages.conf gitlab-pages/bin/gitlab-pages
gitlab-pages-asdf-install:
ifeq ($(asdf_opt_out),false)
@echo
@echo "${DIVIDER}"
@echo "Installing asdf tools from ${gitlab_pages_dir}/.tool-versions"
@echo "${DIVIDER}"
$(Q)cd ${gitlab_pages_dir} && ASDF_DEFAULT_TOOL_VERSIONS_FILENAME="${gitlab_pages_dir}/.tool-versions" asdf install
$(Q)cd ${gitlab_pages_dir} && asdf reshim
else
@true
endif
.PHONY: gitlab-pages/bin/gitlab-pages .PHONY: gitlab-pages/bin/gitlab-pages
gitlab-pages/bin/gitlab-pages: gitlab-pages/.git/pull gitlab-pages/bin/gitlab-pages: gitlab-pages/.git/pull gitlab-pages-asdf-install
@echo @echo
@echo "${DIVIDER}" @echo "${DIVIDER}"
@echo "Compiling gitlab-org/gitlab-pages" @echo "Compiling gitlab-org/gitlab-pages"
@echo "${DIVIDER}" @echo "${DIVIDER}"
$(Q)rm -f gitlab-pages/bin/gitlab-pages $(Q)rm -f gitlab-pages/bin/gitlab-pages
$(Q)support/asdf-exec ${gitlab_pages_clone_dir} $(MAKE) ${QQ} $(Q)support/asdf-exec ${gitlab_pages_dir} $(MAKE) ${QQ}
gitlab-pages/.git: gitlab-pages/.git:
$(Q)support/move-existing-gitlab-pages-directory || GIT_REVISION="${gitlab_pages_version}" support/component-git-clone ${git_params} ${gitlab_pages_repo} ${gitlab_pages_clone_dir} ${QQ} $(Q)support/move-existing-gitlab-pages-directory || GIT_REVISION="${gitlab_pages_version}" support/component-git-clone ${git_params} ${gitlab_pages_repo} ${gitlab_pages_dir} ${QQ}
gitlab-pages/.git/pull: gitlab-pages/.git gitlab-pages/.git/pull: gitlab-pages/.git
@echo @echo
@echo "${DIVIDER}" @echo "${DIVIDER}"
@echo "Updating gitlab-org/gitlab-pages to ${gitlab_pages_version}" @echo "Updating gitlab-org/gitlab-pages to ${gitlab_pages_version}"
@echo "${DIVIDER}" @echo "${DIVIDER}"
$(Q)support/component-git-update gitlab_pages "${gitlab_pages_clone_dir}" "${gitlab_pages_version}" master $(Q)support/component-git-update gitlab_pages "${gitlab_pages_dir}" "${gitlab_pages_version}" master
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册