Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the support to specify the version of the binaries #251

Merged
merged 2 commits into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ script:
- cd $TRAVIS_BUILD_DIR/../incubator-openwhisk
- ./gradlew install
- cd $TRAVIS_BUILD_DIR
- ./gradlew --console=plain release
- ./gradlew --console=plain releaseBinaries
- ./tools/travis/test_openwhisk.sh

after_success:
Expand Down
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ OpenWhiskPlatform.zipFileName =
System.env['zip_file_name'] ?:
(rootProject.findProperty('zipFileName') ?: 'OpenWhisk_CLI')

project.ext.packageVersion =
rootProject.findProperty('packageVersion') ?: 'latest'

String buildFileName = System.env['build_file_name'] ?:
(rootProject.findProperty('buildFileName') ?: 'wsk')

Expand Down Expand Up @@ -214,7 +217,7 @@ task individualArchives(
type: (p.goOs == 'linux') ? Tar : Zip, dependsOn: compile) {
if (p.goOs == 'linux') { compression = Compression.GZIP }
destinationDir = file('./release')
baseName = "${p.zipFileName}-latest-${p.owOs}-${p.goArch}"
baseName = "${p.zipFileName}-${packageVersion}-${p.owOs}-${p.goArch}"
from "./build/${p.goOs}-${p.goArch}/"
include "${buildFileName}*"
}
Expand Down Expand Up @@ -243,14 +246,14 @@ task index() {
}
}

task release(type: Tar, dependsOn: [individualArchives, index]) {
task releaseBinaries(type: Tar, dependsOn: [individualArchives, index]) {
compression = Compression.GZIP
destinationDir = file('./release')
baseName = "${OpenWhiskPlatform.zipFileName}-latest-all"
baseName = "${OpenWhiskPlatform.zipFileName}-${packageVersion}-all"
from('./build/content.json') { into('.') }
rootProject.platforms.each() { p ->
from('./release/') {
include("${p.zipFileName}-latest-${p.owOs}-${p.goArch}.*")
include("${p.zipFileName}-${packageVersion}-${p.owOs}-${p.goArch}.*")
into p.archiveDirName
rename { p.archiveFileName }
}
Expand Down
2 changes: 1 addition & 1 deletion tools/travis/test_openwhisk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
# the release. If you're running manually, this command should get you to
# the same place:
#
# ./gradlew release
# ./gradlew releaseBinaries
#
# Also at this point, you should already have incubator-openwhisk pulled down
# from gradle in the parent directory, using a command such as:
Expand Down