diff --git a/packaging/Gemfile b/packaging/Gemfile index e96fd10..4e5eb7b 100644 --- a/packaging/Gemfile +++ b/packaging/Gemfile @@ -1,4 +1,4 @@ -source 'http://rubygems.org' +source 'https://rubygems.org' # gem "pact", "1.64.0" # gem "pact-message", "0.11.1" diff --git a/packaging/Gemfile.lock b/packaging/Gemfile.lock index b0aaf55..842e452 100644 --- a/packaging/Gemfile.lock +++ b/packaging/Gemfile.lock @@ -1,5 +1,5 @@ GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: anyway_config (2.6.3) ruby-next-core (~> 1.0) diff --git a/packaging/pact-broker-app.bat b/packaging/pact-broker-app.bat index 905a7ab..1a34536 100644 --- a/packaging/pact-broker-app.bat +++ b/packaging/pact-broker-app.bat @@ -1,20 +1,20 @@ @echo off SET RUNNING_PATH=%~dp0 -CALL :RESOLVE "%RUNNING_PATH%\.." ROOT_PATH +echo %RUNNING_PATH% :: Tell Bundler where the Gemfile and gems are. -set "BUNDLE_GEMFILE=%ROOT_PATH%\lib\vendor\Gemfile" set BUNDLE_IGNORE_CONFIG= set RUBYGEMS_GEMDEPS= set BUNDLE_APP_CONFIG= set BUNDLE_FROZEN=1 +set RACK_ENV=production :: Run the actual app using the bundled Ruby interpreter, with Bundler activated. -@"%ROOT_PATH%\lib\ruby\bin\ruby.bat" -E UTF-8 -rbundler/setup -I "%ROOT_PATH%\lib\app\lib" "%ROOT_PATH%\lib\app\pact-broker-app.rb" %* +@"%RUNNING_PATH%\bin\ruby.exe" "%RUNNING_PATH%\src\pact-broker-app.rb" "%RUNNING_PATH%\src\config.ru" %* GOTO :EOF :RESOLVE SET %2=%~f1 -GOTO :EOF +GOTO :EOF \ No newline at end of file diff --git a/script/package-with-ocra.sh b/script/package-with-ocra.sh index fbfdcdd..50acd9e 100755 --- a/script/package-with-ocra.sh +++ b/script/package-with-ocra.sh @@ -1,26 +1,24 @@ #!/bin/bash -e set -e -gem install aibika +gem install ocran mkdir -p pkg cd packaging unset GEM_HOME bundle install -aibika pact-broker-app.rb config.ru config \ +ocran pact-broker-app.rb pact-broker-app.bat config.ru config \ --verbose \ --output pact-broker-app.exe \ - --gem-all \ - --add-all-core \ - --dll ruby_builtin_dlls/zlib1.dll \ - --dll ruby_builtin_dlls/libgmp-10.dll \ - --dll ruby_builtin_dlls/libyaml-0-2.dll \ - --dll ruby_builtin_dlls/libssl-3-x64.dll \ - --dll ruby_builtin_dlls/libcrypto-3-x64.dll \ + --gem-guess \ --no-dep-run \ + --debug-extract \ --gemfile Gemfile \ - --gem-full \ --chdir-first +pact-broker-app.exe >& nohup.out & +echo $! > $HOME/pid.nohup +cat $HOME/pid.nohup +ls gzip -c pact-broker-app.exe > ../pkg/pact-broker-app.exe.gz # aibika pact-broker.rb ca-bundle.crt --verbose --output pact-broker-cli.exe \ # --gem-all \