Skip to content

Commit

Permalink
Rebase the new bootstrap commits on the version repositories instead of
Browse files Browse the repository at this point in the history
throwing away the old commits
  • Loading branch information
zimmski committed Sep 5, 2016
1 parent 4290fb6 commit 9b1a0ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
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 9b1a0ac

Please sign in to comment.