Skip to content

Commit

Permalink
[chore] Simplify releasing (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Jun 26, 2023
1 parent c0e69ea commit 70d3952
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ verify-versions: | $(MULTIMOD)
$(MULTIMOD) verify

COMMIT ?= "HEAD"
.PHONY: add-tags
add-tags: | $(MULTIMOD)
@[ "${MODSET}" ] || ( echo "MODSET unset: set to taget module set from versions.yaml"; exit 1 )
$(MULTIMOD) verify && $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT}
REMOTE ?= upstream
.PHONY: push-tags
push-tags: | $(MULTIMOD)
$(MULTIMOD) verify
set -e; for tag in `$(MULTIMOD) tag -m all -c ${COMMIT} --print-tags | grep -v "Using" `; do \
echo "pushing tag $${tag}"; \
git push ${REMOTE} $${tag}; \
done;
22 changes: 3 additions & 19 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,9 @@ Once the pull request with all the generated code changes has been approved
and merged use the [`multimod`] utility to tag all modules according to
[`versions.yaml`].

1. For each module set that will be released, run the `add-tags` make target
using the `<commit-hash>` of the commit on the main branch for the merged
Pull Request.

```sh
make add-tags MODSET=<module set> COMMIT=<commit hash>
```

It should only be necessary to provide an explicit `COMMIT` value if the
current `HEAD` of your working directory is not the correct commit.

2. Push tags to the upstream remote (not your fork:
`github.com/open-telemetry/opentelemetry-go-proto.git`). Make sure you
push all sub-modules as well.

```sh
export VERSION="<version>"
for t in $( git tag -l | grep "$VERSION" ); do git push upstream "$t"; done
```
```sh
make push-tags REMOTE=<upstream> COMMIT=<hash>
```

## Release

Expand Down

0 comments on commit 70d3952

Please sign in to comment.