Browse Source

Adapt travis script to use the examples development branch

master
Adrian-George Bostan 1 year ago
parent
commit
527dd2ea63
1 changed files with 12 additions and 4 deletions
  1. +12
    -4
      .travis/build_examples.sh

+ 12
- 4
.travis/build_examples.sh View File

@ -3,11 +3,19 @@ repo_path="$HOME/projects/unipdf-examples"
git clone https://github.com/unidoc/unipdf-examples.git $repo_path
cd $repo_path
branch_name="v3"
if [[ `git ls-remote origin "$TRAVIS_BRANCH"` ]]; then
branch_name="$TRAVIS_BRANCH"
build_branch="$TRAVIS_BRANCH"
if [[ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
build_branch="$TRAVIS_PULL_REQUEST_BRANCH"
fi
if [[ -z "$build_branch" ]]; then
build_branch="development"
fi
target_branch="development"
if [[ `git ls-remote origin "$build_branch"` ]]; then
target_branch="$build_branch"
fi
git checkout $branch_name
git checkout $target_branch
echo "replace github.com/unidoc/unipdf/v3 => $TRAVIS_BUILD_DIR" >> go.mod
./build_examples.sh

Loading…
Cancel
Save