From d96e32b7103bfc2d0850d43473f2e721a80050bd Mon Sep 17 00:00:00 2001 From: ykadowak Date: Thu, 30 Nov 2023 07:49:37 +0000 Subject: [PATCH] Revert "Add make command to update template (#2212)" This reverts commit 8197ffeb07753bda630b5a377ef78d6849633526. --- ...update-pull-request-and-issue-template.yml | 19 ++++++++++++++----- Makefile | 1 - Makefile.d/dependencies.mk | 18 ------------------ 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/.github/workflows/update-pull-request-and-issue-template.yml b/.github/workflows/update-pull-request-and-issue-template.yml index 4df04e3ae6..6702cf7bc9 100644 --- a/.github/workflows/update-pull-request-and-issue-template.yml +++ b/.github/workflows/update-pull-request-and-issue-template.yml @@ -55,12 +55,21 @@ jobs: git checkout main git checkout -b ${BRANCH_NAME} - make update/template + GO_VERSION=$(make version/go) + NGT_VERSION=$(make version/ngt) + KUBECTL_VERSION=$(make version/k8s) - if git diff --quiet --exit-code; then - echo "Nothing updated" - exit 0 - fi + sed -i -e "s/^- Go Version: .*$/- Go Version: ${GO_VERSION}/" .github/ISSUE_TEMPLATE/bug_report.md + sed -i -e "s/^- Go Version: .*$/- Go Version: ${GO_VERSION}/" .github/ISSUE_TEMPLATE/security_issue_report.md + sed -i -e "s/^- Go Version: .*$/- Go Version: ${GO_VERSION}/" .github/PULL_REQUEST_TEMPLATE.md + + sed -i -e "s/^- NGT Version: .*$/- NGT Version: ${NGT_VERSION}/" .github/ISSUE_TEMPLATE/bug_report.md + sed -i -e "s/^- NGT Version: .*$/- NGT Version: ${NGT_VERSION}/" .github/ISSUE_TEMPLATE/security_issue_report.md + sed -i -e "s/^- NGT Version: .*$/- NGT Version: ${NGT_VERSION}/" .github/PULL_REQUEST_TEMPLATE.md + + sed -i -e "s/^- Kubernetes Version: .*$/- Kubernetes Version: ${KUBECTL_VERSION}/" .github/ISSUE_TEMPLATE/bug_report.md + sed -i -e "s/^- Kubernetes Version: .*$/- Kubernetes Version: ${KUBECTL_VERSION}/" .github/ISSUE_TEMPLATE/security_issue_report.md + sed -i -e "s/^- Kubernetes Version: .*$/- Kubernetes Version: ${KUBECTL_VERSION}/" .github/PULL_REQUEST_TEMPLATE.md git add .github/PULL_REQUEST_TEMPLATE.md .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/security_issue_report.md git commit -S --signoff -m ":robot: Automatically update PULL_REQUEST_TEMPLATE and ISSUE_TEMPLATE" diff --git a/Makefile b/Makefile index 01b35bbec9..d859cef45d 100644 --- a/Makefile +++ b/Makefile @@ -388,7 +388,6 @@ update: \ update/libs \ proto/all \ deps \ - update/template \ format \ go/deps diff --git a/Makefile.d/dependencies.mk b/Makefile.d/dependencies.mk index da430a2abd..7f528edc47 100644 --- a/Makefile.d/dependencies.mk +++ b/Makefile.d/dependencies.mk @@ -172,21 +172,3 @@ update/vald: ## update vald client library made by clojure self version update/valdcli: curl --silent https://api.github.com/repos/vdaas/vald-client-clj/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' > $(ROOTDIR)/versions/VALDCLI_VERSION - -.PHONY: update/template -## update PULL_REQUEST_TEMPLATE and ISSUE_TEMPLATE -update/template: - $(eval GO_VERSION := $(shell $(MAKE) -s version/go)) - $(eval NGT_VERSION := $(shell $(MAKE) -s version/ngt)) - $(eval KUBECTL_VERSION := $(shell $(MAKE) -s version/k8s)) - sed -i -e "s/^- Go Version: .*$$/- Go Version: $(GO_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md - sed -i -e "s/^- Go Version: .*$$/- Go Version: $(GO_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md - sed -i -e "s/^- Go Version: .*$$/- Go Version: $(GO_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md - - sed -i -e "s/^- NGT Version: .*$$/- NGT Version: $(NGT_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md - sed -i -e "s/^- NGT Version: .*$$/- NGT Version: $(NGT_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md - sed -i -e "s/^- NGT Version: .*$$/- NGT Version: $(NGT_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md - - sed -i -e "s/^- Kubernetes Version: .*$$/- Kubernetes Version: $(KUBECTL_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md - sed -i -e "s/^- Kubernetes Version: .*$$/- Kubernetes Version: $(KUBECTL_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md - sed -i -e "s/^- Kubernetes Version: .*$$/- Kubernetes Version: $(KUBECTL_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md