Skip to content

Commit

Permalink
Merge pull request #1551 from couchbase/feature/issue_1349
Browse files Browse the repository at this point in the history
Modify hard coded paths to use PRODUCT and PRODUCT_KIND and changed i…
  • Loading branch information
Andrew Reslan committed Feb 1, 2016
2 parents 84b333c + 03b6166 commit 490449e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions build/package-win.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
# GITSPEC stable
# PLATFORM windows-x86_64
# ARCH x86_64
# PRODUCT_KIND sync-gateway
#
require 'rubygems'
require 'fileutils'
require 'rake'

PRODUCT = "couchbase-sync-gateway"
PRODUCT_BASE = "couchbase"

PREFIX = ARGV[0] || "/opt/#{PRODUCT}"
PREFIXD = ARGV[1] || "./opt/#{PRODUCT}"
PREFIX = ARGV[0] || "/opt/couchbase-sync-gateway"
PREFIXD = ARGV[1] || "./opt/couchbase-sync-gateway"
PRODUCT_VERSION = ARGV[2] || "0.0.0-1234"
REPO_SHA = ARGV[3] || "master"
PLATFORM = ARGV[4] || 'windows-x64'
ARCH = ARGV[5] || 'x64'
PRODUCT_KIND = ARGV[6] || "sync_gateway"
PRODUCT_KIND = ARGV[6] || "sync-gateway"

PRODUCT = "#{PRODUCT_BASE}-#{PRODUCT_KIND}"
RELEASE = PRODUCT_VERSION.split('-')[0] # e.g., 1.0.0
Expand All @@ -38,11 +38,13 @@
print "\nDEBUG: 3: REPO_SHA = ", REPO_SHA
print "\nDEBUG: 4: PLATFORM = ", PLATFORM
print "\nDEBUG: 5: ARCH = ", ARCH
print "\nDEBUG: 6: PRODUCT_KIND = ", PRODUCT_KIND
print "\n"
print "\nDEBUG: RELEASE = ", RELEASE
print "\nDEBUG: BLDNUM = ", BLDNUM
print "\n"
print "\nDEBUG: PKGNAME = ", PKGNAME
print "\nDEBUG: PRODUCT = ", PRODUCT
print "\n"

START_DIR = Dir.getwd()
Expand Down Expand Up @@ -71,13 +73,13 @@

INSTALL_PROJ = "#{PRODUCT_KIND}.ism"
INSTALL_SRC = "#{START_DIR}/windows/InstallShield_2014_Projects"
INSTALL_OUT = "#{INSTALL_SRC}/Sync_Gateway/SINGLE_EXE_IMAGE/Release/DiskImages/DISK1"
INSTALL_OUT = "#{INSTALL_SRC}/#{PRODUCT_KIND}/SINGLE_EXE_IMAGE/Release/DiskImages/DISK1"

proj_param = "#{INSTALL_SRC}/#{INSTALL_PROJ}"
proj_param = proj_param.gsub('/', '\\')

path_to_workspace = "#{ENV['WORKSPACE']}"
path_to_sgw_files = "#{path_to_workspace}\\app-under-test\\sync_gateway\\build\\opt\\couchbase-sync-gateway"
path_to_sgw_files = "#{path_to_workspace}\\app-under-test\\sync_gateway\\build\\opt\\#{PRODUCT}"
installer_params = "-l PATH_TO_JENKINS_WORKSPACE=#{path_to_workspace} -l PATH_TO_SYNC_GATEWAY_FILES=#{path_to_sgw_files}"

print "\nISCmdBld.exe -v -y #{RELEASE} -d ProductVersion=#{RELEASE}.#{BLDNUM} #{installer_params} -p #{proj_param}\n"
Expand Down

0 comments on commit 490449e

Please sign in to comment.