Skip to content

Commit

Permalink
Account for user name in prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
2maz committed Mar 5, 2020
1 parent 80779d1 commit d623d5f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .ci/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
export AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR=1
export AUTOPROJ_NONINTERACTIVE=1

if [ "$PKG_PULL_REQUEST_SLUG" != "" ]; then
PACKAGE_SET_SLUG="${PKG_PULL_REQUEST_SLUG}"
export PACKAGE_SET_SLUG
else
PACKAGE_SET_SLUG="rock-core/rock-package_set"
export PACKAGE_SET_SLUG
fi
echo "Using package set slug: ${PACKAGE_SET_SLUG}"

ruby /home/docker/autoproj_bootstrap git https://github.com/rock-core/buildconf.git branch=master --seed-config=seed-config.yml

if [ "$PKG_PULL_REQUEST" = "false" ]; then
Expand All @@ -28,8 +37,8 @@ else
fi

if [ "$PKG_NAME" != "" ]; then
echo "Build updated package: $PKG_BRANCH"
sed -i "s#github: rock-core/rock-package_set#rock:\n type: git\n url: https://github.com/rock-core/rock-package_set\n branch: $PKG_BRANCH#g" autoproj/manifest
echo "Build updated package $PKG_NAME from branch: $PKG_BRANCH"
sed -i "s#github: rock-core/rock-package_set#rock:\n type: git\n url: https://github.com/$PACKAGE_SET_SLUG \n branch: $PKG_BRANCH#g" autoproj/manifest
cat autoproj/manifest
sed -i "s#rock\.core#${PKG_NAME}#g" autoproj/manifest
cat autoproj/manifest
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
--build-arg PKG_BRANCH="${TRAVIS_BRANCH}"
--build-arg PKG_PULL_REQUEST="${TRAVIS_PULL_REQUEST}"
--build-arg PKG_PULL_REQUEST_BRANCH="${TRAVIS_PULL_REQUEST_BRANCH}"
--build-arg PKG_PULL_REQUEST_SLUG="${TRAVIS_PULL_REQUEST_SLUG}"
script:
- docker run rock/package_set /bin/bash -c "source /home/docker/rock_test/env.sh"
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ ENV PKG_PULL_REQUEST=${PKG_PULL_REQUEST}

ARG PKG_PULL_REQUEST_BRANCH=""
ENV PKG_PULL_REQUEST_BRANCH=${PKG_PULL_REQUEST_BRANCH}

ARG PKG_PULL_REQUEST_SLUG=""
ENV PKG_PULL_REQUEST_SLUG=${PKG_PULL_REQUEST_SLUG}
## END ARGUMENTS

RUN apt update
Expand Down

0 comments on commit d623d5f

Please sign in to comment.