[java-parent-project-v3] branch master updated: JPAR-92 Update helper scripts for Git
Ian Young
ian at iay.org.uk
Wed Apr 26 09:56:32 EDT 2017
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch master
in repository java-parent-project-v3.
View the commit online:
http://git.shibboleth.net/view/?p=java-parent-project-v3.git;a=commit;h=fdd94cd7b61afc4a16565248c9e400341a71abc7
The following commit(s) were added to refs/heads/master by this push:
new fdd94cd JPAR-92 Update helper scripts for Git
fdd94cd is described below
commit fdd94cd7b61afc4a16565248c9e400341a71abc7
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Wed Apr 26 14:56:22 2017 +0100
JPAR-92 Update helper scripts for Git
---
bin/add-module.sh | 9 ++++-----
bin/create-project-common.sh | 17 +++++++++++++++--
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/bin/add-module.sh b/bin/add-module.sh
index 82f1626..0ec0e24 100755
--- a/bin/add-module.sh
+++ b/bin/add-module.sh
@@ -29,15 +29,14 @@ check_retval $? "Unable to copy module POM template to $MODULE_DIR"
expand_macro $MODULE_DIR/pom.xml "MVN_ARTF_ID" $MVN_ARTF_ID
+download_file $PARENT_PROJ_URL"resources/git/gitignore" "$MODULE_DIR/.gitignore"
+
$ECHO "Committing module structure"
-$SVN add -q $MODULE_DIR
+$GIT add $MODULE_DIR
check_retval $? "Error adding $MODULE_DIR to SVN control"
-$SVN commit -q -m "Add module $MVN_ARTF_ID to project" $MODULE_DIR
+$GIT commit -q -m "Add module $MVN_ARTF_ID to project" $MODULE_DIR
check_retval $? "Unable to commit $MODULE_DIR"
-$ECHO "Setting SVN properties on $MODULE_DIR"
-set_svn_properties_commit_and_update "$MODULE_DIR"
-
$ECHO "Creation of module $MVN_ARTF_ID completed."
exit 0
diff --git a/bin/create-project-common.sh b/bin/create-project-common.sh
index 6005ec5..99cfdb7 100755
--- a/bin/create-project-common.sh
+++ b/bin/create-project-common.sh
@@ -69,15 +69,28 @@ function expand_macro {
}
# Creates the ./src directory structure within a given directory and places a logback-text.xml
-# configuration file in the src/test/resources directory
+# configuration file in the src/test/resources directory.
+#
+# .gitkeep files are created in all new empty directories so that they will be committed to
+# the Git repository. These placeholder files can be deleted once these directories are
+# populated (for those that are populated later; some may never be but Eclipse likes them
+# to be present nevertheless).
#
# $1 directory within which the ./src directory structure will be created
function create_src {
$MKDIR -p "$1/src/main/java" "$1/src/main/resources" "$1/src/test/java" "$1/src/test/resources"
check_retval $? "Unable to create Maven src directories"
-
+
download_file $PARENT_PROJ_URL"resources/logback/logback-test.xml" "$1/src/test/resources/logback-test.xml"
check_retval $? "Unable to download logback-text.xml into src/test/resources"
+
+ # Create .gitkeep files in newly created empty directories.
+ $TOUCH $1/src/main/java/.gitkeep
+ check_retval $? "Unable to create .gitkeep file in $1/src/main/java"
+ $TOUCH $1/src/main/resources/.gitkeep
+ check_retval $? "Unable to create .gitkeep file in $1/src/main/resources"
+ $TOUCH $1/src/test/java/.gitkeep
+ check_retval $? "Unable to create .gitkeep file in $1/src/test/java"
}
# Creates the src/main/assembly directory and places an initial assembly descriptor in it
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list