diff options
author | Eike Ziller <eike.ziller@qt.io> | 2017-02-07 10:45:45 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-02-14 12:39:13 +0000 |
commit | 750bb2981cf3cec5c6ccdf0b37a4ea3bc306457c (patch) | |
tree | 62c4ebca9f1c5eda7ab0c3db50836f854ee1df7a | |
parent | fd92d920d64e2dfd699635533d179e0c9b609a6d (diff) |
Initial setup with Qt Creator submodule
So far without any helper scripts for setting up submodules for
work, but let's get started.
Change-Id: I3ea949e21d8e6e52b6c30052351ce23f9028ab1e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r-- | .gitmodules | 4 | ||||
-rw-r--r-- | .qmake.conf | 2 | ||||
-rw-r--r-- | README.md | 42 | ||||
-rw-r--r-- | qtc-super.pro | 8 | ||||
-rw-r--r-- | qtc-super.qbs | 13 | ||||
m--------- | qtcreator | 0 |
6 files changed, 69 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9593a62 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "qtcreator"] + path = qtcreator + url = ../qt-creator + branch = master diff --git a/.qmake.conf b/.qmake.conf new file mode 100644 index 0000000..a0f7fb6 --- /dev/null +++ b/.qmake.conf @@ -0,0 +1,2 @@ +IDE_SOURCE_TREE = $$PWD/qtcreator +IDE_BUILD_TREE = $$shadowed($$IDE_SOURCE_TREE) diff --git a/README.md b/README.md new file mode 100644 index 0000000..07bcd3c --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ + +# Prerequisites: + +* Git version 1.8.2 or later + For the submodule --remote option, which makes git pull the latest HEAD + of the right branch for the submodules, instead of a fixed commit. + +* Further prerequisites as mentioned in `qtcreator/README.md` + +# Initializing + +Initialize all submodules and checks out current HEAD of remote branch: + + git checkout <qtcreatorbranch> + git submodule update --init --remote + +# Updating: + +Pulls and rebases all initialized submodules to current HEAD of remote branch: + + git pull --rebase + git submodule update --remote --rebase + +# Working: + +Set up a submodule for working with gerrit by adding the gerrit remote, +and installing the commit message hook, similar to how it is described in +[Setting up Gerrit (If you did not use the init-repository +scripts)](https://wiki.qt.io/Setting_up_Gerrit#Setting_up_git_hooks). +You might also want to work on a branch in the submodule. Then [work in the +submodule as usual](https://wiki.qt.io/Gerrit_Introduction) and push to +gerrit via the `gerrit` remote. + + cd <submodule> + # add submodule + git remote add gerrit ssh://codereview.qt-project.org/qt-creator/<submodule_repository> + # install hook + gitdir=$(git rev-parse --git-dir); scp -p codereview.qt-project.org:hooks/commit-msg ${gitdir}/hooks/ + # optional: check out branch + git checkout <branch> + # do some work, then push to gerrit + git push gerrit HEAD:refs/for/<branch> diff --git a/qtc-super.pro b/qtc-super.pro new file mode 100644 index 0000000..84c5026 --- /dev/null +++ b/qtc-super.pro @@ -0,0 +1,8 @@ +TEMPLATE = subdirs + +mkpath($$OUT_PWD/qtcreator) # so the qtcreator.pro is able to create a .qmake.cache there + +SUBDIRS = \ + qtcreator + +DISTFILES += .qmake.conf diff --git a/qtc-super.qbs b/qtc-super.qbs new file mode 100644 index 0000000..59c3eba --- /dev/null +++ b/qtc-super.qbs @@ -0,0 +1,13 @@ +import qbs +import qbs.File +import qbs.FileInfo + +Project { + name: "Qt Creator Super Project" + + qbsSearchPaths: ["qtcreator/qbs"] + + SubProject { + filePath: "qtcreator/qtcreator.qbs" + } +} diff --git a/qtcreator b/qtcreator new file mode 160000 +Subproject 8f53c02296ee2c25012cb446ccbb6a544510f8f |