Skip to content
Closed
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ jobs:
matrix:
os: ["windows-latest","ubuntu-latest","macos-latest"]
shell: ["sh","bash"]
pact_cli_legacy: ["", "1"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
- name: test ${{ matrix.os }} package
run: ./script/unpack-and-test.sh
env:
PACT_CLI_LEGACY: ${{ matrix.pact_cli_legacy }}
890 changes: 605 additions & 285 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ echo "pact-standalone ${PACT_CLI_VERSION} installed to $(pwd)/pact"
echo "-------------------"
echo "available commands:"
echo "-------------------"
PROJECT_NAME=pact-cli
PROJECT_NAME=pact
PACT_CLI_BIN_PATH=${PWD}/pact/bin/

ls -1 "$PACT_CLI_BIN_PATH"
Expand Down
674 changes: 640 additions & 34 deletions packaging/README.md.template

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions packaging/pact-broker.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
SET RUNNING_PATH=%~dp0
CALL :RESOLVE "%RUNNING_PATH%\.." ROOT_PATH

IF NOT DEFINED PACT_CLI_LEGACY (
IF "%~1"=="" (
%RUNNING_PATH%pact.exe broker --help
EXIT /B %ERRORLEVEL%
) ELSE (
%RUNNING_PATH%pact.exe broker %*
EXIT /B %ERRORLEVEL%
)
)

:: Tell Bundler where the Gemfile and gems are.
set "BUNDLE_GEMFILE=%ROOT_PATH%\lib\vendor\Gemfile"
set BUNDLE_IGNORE_CONFIG=
Expand Down
12 changes: 12 additions & 0 deletions packaging/pact-broker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ done
RDIR="$( dirname "$SOURCE" )"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

if [ -z "${PACT_CLI_LEGACY}" ]; then
APP="$DIR/pact"
if [ -x "$APP" ]; then
if [ "$#" -eq 0 ]; then
exec "$APP" broker --help
else
exec "$APP" broker "$@"
fi
exit $?
fi
fi

# Figure out where this script is located.
LIBDIR="$(cd "$DIR" && cd ../lib && pwd)"

Expand Down
6 changes: 6 additions & 0 deletions packaging/pact-message.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
SET RUNNING_PATH=%~dp0
CALL :RESOLVE "%RUNNING_PATH%\.." ROOT_PATH

IF NOT DEFINED PACT_CLI_LEGACY (
echo pact-message is deprecated. Please use pact_mock_server_cli instead.
echo or set the PACT_CLI_LEGACY environment variable to use the old CLI.
EXIT /B 1
)

:: Tell Bundler where the Gemfile and gems are.
set "BUNDLE_GEMFILE=%ROOT_PATH%\lib\vendor\Gemfile"
set BUNDLE_IGNORE_CONFIG=
Expand Down
6 changes: 6 additions & 0 deletions packaging/pact-message.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ done
RDIR="$( dirname "$SOURCE" )"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

if [ -z "${PACT_CLI_LEGACY}" ]; then
echo "pact-message is deprecated. Please use pact_mock_server_cli instead."
echo "or set the PACT_CLI_LEGACY environment variable to use the old CLI."
exit 1
fi

# Figure out where this script is located.
LIBDIR="$(cd "$DIR" && cd ../lib && pwd)"

Expand Down
11 changes: 11 additions & 0 deletions packaging/pact-mock-service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
SET RUNNING_PATH=%~dp0
CALL :RESOLVE "%RUNNING_PATH%\.." ROOT_PATH

IF NOT DEFINED PACT_CLI_LEGACY (
IF "%~1"=="" (
%RUNNING_PATH%pact.exe mock --help
EXIT /B %ERRORLEVEL%
) ELSE (
%RUNNING_PATH%pact.exe mock %*
EXIT /B %ERRORLEVEL%
)
)


:: Tell Bundler where the Gemfile and gems are.
set "BUNDLE_GEMFILE=%ROOT_PATH%\lib\vendor\Gemfile"
set BUNDLE_IGNORE_CONFIG=
Expand Down
12 changes: 12 additions & 0 deletions packaging/pact-mock-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ done
RDIR="$( dirname "$SOURCE" )"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

if [ -z "${PACT_CLI_LEGACY}" ]; then
APP="$DIR/pact"
if [ -x "$APP" ]; then
if [ "$#" -eq 0 ]; then
exec "$APP" mock --help
else
exec "$APP" mock "$@"
fi
exit $?
fi
fi

# Figure out where this script is located.
LIBDIR="$(cd "$DIR" && cd ../lib && pwd)"

Expand Down
10 changes: 10 additions & 0 deletions packaging/pact-provider-verifier.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
SET RUNNING_PATH=%~dp0
CALL :RESOLVE "%RUNNING_PATH%\.." ROOT_PATH

IF NOT DEFINED PACT_CLI_LEGACY (
IF "%~1"=="" (
%RUNNING_PATH%pact.exe verifier --help
EXIT /B %ERRORLEVEL%
) ELSE (
%RUNNING_PATH%pact.exe verifier %*
EXIT /B %ERRORLEVEL%
)
)

:: Tell Bundler where the Gemfile and gems are.
set "BUNDLE_GEMFILE=%ROOT_PATH%\lib\vendor\Gemfile"
set BUNDLE_IGNORE_CONFIG=
Expand Down
12 changes: 12 additions & 0 deletions packaging/pact-provider-verifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ done
RDIR="$( dirname "$SOURCE" )"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

if [ -z "${PACT_CLI_LEGACY}" ]; then
APP="$DIR/pact"
if [ -x "$APP" ]; then
if [ "$#" -eq 0 ]; then
exec "$APP" verifier --help
else
exec "$APP" verifier "$@"
fi
exit $?
fi
fi

# Figure out where this script is located.
LIBDIR="$(cd "$DIR" && cd ../lib && pwd)"

Expand Down
10 changes: 10 additions & 0 deletions packaging/pact-publish.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
SET RUNNING_PATH=%~dp0
CALL :RESOLVE "%RUNNING_PATH%\.." ROOT_PATH

IF NOT DEFINED PACT_CLI_LEGACY (
IF "%~1"=="" (
%RUNNING_PATH%pact.exe pact publish --help
EXIT /B %ERRORLEVEL%
) ELSE (
%RUNNING_PATH%pact.exe pact publish %*
EXIT /B %ERRORLEVEL%
)
)

:: Tell Bundler where the Gemfile and gems are.
set "BUNDLE_GEMFILE=%ROOT_PATH%\lib\vendor\Gemfile"
set BUNDLE_IGNORE_CONFIG=
Expand Down
12 changes: 12 additions & 0 deletions packaging/pact-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ done
RDIR="$( dirname "$SOURCE" )"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

if [ -z "${PACT_CLI_LEGACY}" ]; then
APP="$DIR/pact"
if [ -x "$APP" ]; then
if [ "$#" -eq 0 ]; then
exec "$APP" pact publish --help
else
exec "$APP" pact publish "$@"
fi
exit $?
fi
fi

# Figure out where this script is located.
LIBDIR="$(cd "$DIR" && cd ../lib && pwd)"

Expand Down
10 changes: 10 additions & 0 deletions packaging/pact-stub-service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
SET RUNNING_PATH=%~dp0
CALL :RESOLVE "%RUNNING_PATH%\.." ROOT_PATH

IF NOT DEFINED PACT_CLI_LEGACY (
IF "%~1"=="" (
%RUNNING_PATH%pact.exe stub --help
EXIT /B %ERRORLEVEL%
) ELSE (
%RUNNING_PATH%pact.exe stub %*
EXIT /B %ERRORLEVEL%
)
)

:: Tell Bundler where the Gemfile and gems are.
set "BUNDLE_GEMFILE=%ROOT_PATH%\lib\vendor\Gemfile"
set BUNDLE_IGNORE_CONFIG=
Expand Down
12 changes: 12 additions & 0 deletions packaging/pact-stub-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ done
RDIR="$( dirname "$SOURCE" )"
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

if [ -z "${PACT_CLI_LEGACY}" ]; then
APP="$DIR/pact"
if [ -x "$APP" ]; then
if [ "$#" -eq 0 ]; then
exec "$APP" stub --help
else
exec "$APP" stub "$@"
fi
exit $?
fi
fi

# Figure out where this script is located.
LIBDIR="$(cd "$DIR" && cd ../lib && pwd)"

Expand Down
20 changes: 0 additions & 20 deletions packaging/pact.bat

This file was deleted.

92 changes: 0 additions & 92 deletions packaging/pact.rb

This file was deleted.

29 changes: 0 additions & 29 deletions packaging/pact.sh

This file was deleted.

9 changes: 9 additions & 0 deletions packaging/pactflow.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
SET RUNNING_PATH=%~dp0
CALL :RESOLVE "%RUNNING_PATH%\.." ROOT_PATH

IF NOT DEFINED PACT_CLI_LEGACY (
IF "%~1"=="" (
%RUNNING_PATH%pact.exe pactflow --help
EXIT /B %ERRORLEVEL%
) ELSE (
%RUNNING_PATH%pact.exe pactflow %*
EXIT /B %ERRORLEVEL%
)
)
:: Tell Bundler where the Gemfile and gems are.
set "BUNDLE_GEMFILE=%ROOT_PATH%\lib\vendor\Gemfile"
set BUNDLE_IGNORE_CONFIG=
Expand Down
Loading