Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #8 from replit/lh-fix-make-all
Browse files Browse the repository at this point in the history
This change makes `make publish-go` work again. This is because `git
subtree split` will create different commits each time, since they each
commit will contain the current user's username / email as the committer
and the current timestamp as the commit time, therefore changing the
hash of the commits.

Instead, this will now create a new worktree so that the original
contents of the protocol-go repository will be rebased on to preserve
whatever commits were there before.
  • Loading branch information
lhchavez authored Nov 24, 2020
2 parents 8fa0e8d + 5b9f3da commit 5478eb8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules

go-release/
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ build-go: clean-go
protoc api.proto --go_out=./go
publish-go:
VERSION=$$(git tag | sort -r --version-sort | head -n1) && \
[ -d .git/refs/remotes/protocol-go ] || git remote add -f protocol-go git@github.com:replit/protocol-go.git && \
rm -rf ./go-release/
git subtree split --prefix=go -b go-release && \
git push git@github.com:replit/protocol-go.git go-release:master && \
git push git@github.com:replit/protocol-go.git HEAD:refs/tags/$${VERSION} && \
git worktree add --checkout ./go-release/ go-release && \
(cd ./go-release/ && \
git pull --rebase protocol-go master && \
git push protocol-go go-release:master && \
git push protocol-go HEAD:refs/tags/$${VERSION}) && \
rm -rf ./go-release/ && \
git worktree remove -f go-release && \
git branch -D go-release

0 comments on commit 5478eb8

Please sign in to comment.