Skip to content

Commit

Permalink
Merge pull request #118 from go-clang/rebase-on-update
Browse files Browse the repository at this point in the history
Rebase the new bootstrap commits on the version repositories
  • Loading branch information
zimmski authored Sep 5, 2016
2 parents 4290fb6 + db8ae87 commit 50b66e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ install-dependencies:
go get -u github.com/termie/go-shutil/...
install-tools:
# Install linting tools
go get -u golang.org/x/tools/cmd/vet/...
go get -u github.com/golang/lint/...
go get -u github.com/kisielk/errcheck/...

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ Every now and then a new Clang subminor version is released. The given version c
$GOPATH/src/github.com/go-clang/gen/scripts/update-clang-version.sh 3.4
```

This will reset the commits of the `v3.4` repository to the latest commit of the `bootstrap` repository. The command also generates, installs, configures and tests bindings for the given Clang version. The changes must then be manually verified, added, committed and pushed to the already set up remote "origin".

> **Please note**, since we generate the whole binding anew we do not need the old commits and thus just throw them away.
This will rebase the latest commits of the `bootstrap` repository onto the commits of the `v3.4` repository. The command also generates, installs, configures and tests bindings for the given Clang version. The changes must then be manually verified, added, committed and pushed to the already set up remote "origin".

### Update branches with a new `go-clang/gen` version (VM)

Expand Down
16 changes: 7 additions & 9 deletions scripts/update-clang-version.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
#!/bin/bash

set -exuo pipefail

if [ -z "$1" ]; then
exit
fi

export LLVM_VERSION=$1

# Switch Clang version
$(dirname "$0")/switch-clang-version.sh $LLVM_VERSION || exit
$(dirname "$0")/switch-clang-version.sh $LLVM_VERSION

# Update the repository
cd v${LLVM_VERSION} || exit
cd v${LLVM_VERSION}

git checkout bootstrap/master || exit
LAST_BOOTSTRAP=$(git rev-parse HEAD)
git checkout master
git reset --hard $LAST_BOOTSTRAP
git fetch --prune bootstrap

git fetch --prune bootstrap || exit
git rebase bootstrap/master master
git rebase master bootstrap/master

# Generate the new Clang version
$(dirname "$0")/generate-and-test.sh $LLVM_VERSION || exit
$(dirname "$0")/generate-and-test.sh $LLVM_VERSION

0 comments on commit 50b66e5

Please sign in to comment.