You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by mr...@apache.org on 2018/02/05 21:20:43 UTC

[incubator-openwhisk-wskdeploy] branch master updated: Add the support to package the source code (#706)

This is an automated email from the ASF dual-hosted git repository.

mrutkowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git


The following commit(s) were added to refs/heads/master by this push:
     new ce2eca4  Add the support to package the source code (#706)
ce2eca4 is described below

commit ce2eca46b49545e923514254e30bf1940e5e2d2e
Author: Vincent <sh...@us.ibm.com>
AuthorDate: Mon Feb 5 16:20:41 2018 -0500

    Add the support to package the source code (#706)
    
    We can generate the package of source code by running
    ./gradlew taredSources, the project version can be specified via
    the parameter projectVersion, e.g. ./gradlew taredSources -PprojectVersion=1.0.
    
    To clean up all the artifacts generated under the folder build,
    we can run ./gradlew cleanBuild.
---
 build.gradle | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/build.gradle b/build.gradle
index 1cf4798..965aa96 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,6 +20,41 @@ ext.dockerContainerName = "wskdeploy"
 ext.dockerBuildArgs = getDockerBuildArgs()
 apply from: 'gradle/docker.gradle'
 
+project.ext {
+    basePackageName = "openwhisk-wskdeploy"
+    packageExtension = "tar.gz"
+    if (project.hasProperty('projectVersion')) {
+        packageVersion = "${projectVersion}"
+    } else {
+        packageVersion = ""
+    }
+    buildFolder = "build"
+}
+
+task taredSources(type: Tar) {
+    baseName basePackageName
+    description "Creates a combined tar.gz file of wskdeploy's sources"
+    group "Release artifact"
+    classifier "sources"
+
+    from(project.rootDir) {
+        include('cmd/*.go', 'deployers/*.go', 'parsers/*.go', 'utils/*.go',
+                'wskderrors/*.go', 'wskenv/*.go', 'wskprint/*.go', 'wski18n/**')
+        include('*.go')
+        include('gradle/**')
+        include('README.md', 'CONTRIBUTING.md', 'DEPENDENCIES.md')
+        include('gradlew', 'gradlew.bat', 'Dockerfile', 'build.gradle')
+        include('LICENSE', 'NOTICE', 'CHANGELOG')
+    }
+    destinationDir file(buildFolder)
+    extension packageExtension
+    version packageVersion
+    compression = Compression.GZIP
+}
+
+task cleanBuild(type: Delete) {
+    delete file(buildFolder).listFiles()
+}
 
 task removeBinary(type: Delete) {
     delete "${projectDir}/bin/wskdeploy"

-- 
To stop receiving notification emails like this one, please contact
mrutkowski@apache.org.