File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -653,6 +653,23 @@ emit-adp-build-metadata: ## Emits ADP build metadata shell variables suitable fo
653653 @echo " APP_VERSION=${ADP_APP_VERSION} "
654654 @echo " APP_BUILD_TIME=${ADP_APP_BUILD_TIME} "
655655
656+ .PHONY : bump-adp-version
657+ bump-adp-version : # # Creates a PR branch that bumps the ADP patch version
658+ $(eval CURRENT_VERSION := $(shell grep -E '^version = "' bin/agent-data-plane/Cargo.toml | head -n 1 | cut -d '"' -f 2) )
659+ $(eval MAJOR := $(shell echo $(CURRENT_VERSION ) | cut -d '.' -f 1) )
660+ $(eval MINOR := $(shell echo $(CURRENT_VERSION ) | cut -d '.' -f 2) )
661+ $(eval PATCH := $(shell echo $(CURRENT_VERSION ) | cut -d '.' -f 3) )
662+ $(eval NEW_PATCH := $(shell echo $$(($(PATCH ) + 1 ) ) ) )
663+ $(eval NEW_VERSION := $(MAJOR ) .$(MINOR ) .$(NEW_PATCH ) )
664+ @echo " [*] Bumping ADP from $( CURRENT_VERSION) to $( NEW_VERSION) "
665+ @git fetch origin main
666+ @git checkout -b bump-adp-version-$(NEW_VERSION ) origin/main
667+ @sed -i ' s/^version = "$(CURRENT_VERSION)"/version = "$(NEW_VERSION)"/' bin/agent-data-plane/Cargo.toml
668+ @cargo update -p agent-data-plane --quiet
669+ @git add bin/agent-data-plane/Cargo.toml Cargo.lock
670+ @git commit -m " chore(agent-data-plane): bump version to $( NEW_VERSION) "
671+ @echo " [*] Created branch 'bump-adp-version-$( NEW_VERSION) ' with version bump commit."
672+
656673# #@ Docs
657674
658675.PHONY : check-js-build-tools
You can’t perform that action at this time.
0 commit comments