aboutsummaryrefslogtreecommitdiff
path: root/bdep/new-types.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-08 14:23:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-12 14:32:26 +0200
commit67097bb095819072579994595a2e2cb6e0cd9600 (patch)
tree7a8c6ac3e87e81cec19f6293a30da9ffbff412df /bdep/new-types.hxx
parent1bc3177c5acbddc96584004b86db82f489b78346 (diff)
Add support for creating new projects with existing files
We also recognize and handle the following existing entries in the project root: .git -- assume VCS is already initialized and is Git LICENSE -- try to guess the license from contents README.md -- try to extract the summary line from contents Overall, the idea is to streamline the workflow where one creates a project on one of the hosting services (GitHub, GitLab) and then initializes it with bdep-new. Also, to this effect, specifying the project name is now optional and if omitted the current working directory (or --output-dir, if specified) is assumed to be the project name. Here is an example of this workflow: $ # create project with LICENSE and README.md on Git hosting service $ git clone .../libhello.git $ cd libhello $ bdep new -t lib
Diffstat (limited to 'bdep/new-types.hxx')
-rw-r--r--bdep/new-types.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/bdep/new-types.hxx b/bdep/new-types.hxx
index d1ef18f..a8d733e 100644
--- a/bdep/new-types.hxx
+++ b/bdep/new-types.hxx
@@ -127,6 +127,9 @@ namespace bdep
operator vcs_type () const {return vcs;}
+ cmd_new_vcs_template&
+ operator= (vcs_type v) {vcs = v; return *this;}
+
GIT git_opt;
NONE none_opt;