Skip to content

Commit

Permalink
Merge pull request #120 from go-clang/automate-bootstrap-regeneration
Browse files Browse the repository at this point in the history
Add a script to regenerate the bootstrap repository
  • Loading branch information
zimmski authored Sep 8, 2016
2 parents 50b66e5 + b45d7ae commit 12a5893
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ make lint

This will switch to the current Clang version for the `go-clang-gen` command, execute all tests and process the source code with the project's linters. Make sure that you do not introduce new linting problems.

### Regenerate the bindings for the `bootstrap` repository

The `bootstrap` repository holds the base for all version repositories it must therefore be updated if something changes in the `gen` repository to regenerate all version repositories. This tedious task is automated by the following command.

```bash
$GOPATH/src/github.com/go-clang/gen/scripts/update-bootstrap.sh
```

Any changes must be manually verified and pushed via a feature branch.

## Maintainer documentation

The following sections are specific to the maintaining process.
Expand All @@ -75,7 +85,7 @@ If a new version is available create a repository on GitHub named `v<MAJOR>.<MIN
$GOPATH/src/github.com/go-clang/gen/scripts/create-clang-version.sh 3.4
```

This will create a new repository `v3.4` in your current directory and initialize it using 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".
This will create a new repository `v3.4` in your current directory and initialize it using 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".

### Update a branch with a new Clang version (VM)

Expand Down
26 changes: 26 additions & 0 deletions scripts/update-bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -exuo pipefail

# Switch to the correct Clang version for the bootstrap and the gen repositories
$GOPATH/src/github.com/go-clang/gen/scripts/switch-clang-version.sh 3.4

# Install the current go-clang-gen command
make -C $GOPATH/src/github.com/go-clang/gen install

# Generate the Clang bindings
cd $GOPATH/src/github.com/go-clang/bootstrap/clang/

rm -rf clang-c/
rm *_gen.go

go-clang-gen

cd ..

# Install and test the bindings
make install
make test

# Show the current state of the repository
git status

0 comments on commit 12a5893

Please sign in to comment.