Skip to content

Commit 56471a3

Browse files
author
Daniel Mikusa
authored
Merge pull request #57 from paketo-buildpacks/update/pipeline
Bump pipeline from 1.17.0 to 1.18.0
2 parents 95e8302 + b6787ac commit 56471a3

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/pipeline-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.17.0
1+
1.18.0

.github/workflows/create-package.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,25 @@ jobs:
118118
119119
if [[ "${INCLUDE_DEPENDENCIES}" == "true" ]]; then
120120
create-package \
121+
--source ${SOURCE_PATH:-.} \
121122
--cache-location "${HOME}"/carton-cache \
122123
--destination "${HOME}"/buildpack \
123124
--include-dependencies \
124125
--version "${VERSION}"
125126
else
126127
create-package \
128+
--source ${SOURCE_PATH:-.} \
127129
--destination "${HOME}"/buildpack \
128130
--version "${VERSION}"
129131
fi
130132
131-
[[ -e package.toml ]] && cp package.toml "${HOME}"/package.toml
133+
PACKAGE_FILE=${SOURCE_PATH:-.}/package.toml
134+
[[ -e ${PACKAGE_FILE} ]] && cp ${PACKAGE_FILE} "${HOME}"/package.toml
132135
printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}"/buildpack "${OS}" >> "${HOME}"/package.toml
133136
env:
134137
INCLUDE_DEPENDENCIES: "false"
135138
OS: linux
139+
SOURCE_PATH: ""
136140
VERSION: ${{ steps.version.outputs.version }}
137141
- name: Package Buildpack
138142
id: package
@@ -141,13 +145,13 @@ jobs:
141145
142146
set -euo pipefail
143147
144-
if [[ -n "${PUBLISH+x}" ]]; then
148+
if [[ "${PUBLISH:-x}" == "true" ]]; then
145149
pack buildpack package \
146150
"${PACKAGE}:${VERSION}" \
147151
--config "${HOME}"/package.toml \
148152
--publish
149153
150-
if [ ! -z ${VERSION_MINOR} ] && [ ! -z ${VERSION_MAJOR} ]; then
154+
if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then
151155
crane tag "${PACKAGE}:${VERSION}" "${VERSION_MINOR}"
152156
crane tag "${PACKAGE}:${VERSION}" "${VERSION_MAJOR}"
153157
fi

.github/workflows/tests.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,20 @@ jobs:
9292
9393
if [[ "${INCLUDE_DEPENDENCIES}" == "true" ]]; then
9494
create-package \
95+
--source ${SOURCE_PATH:-.} \
9596
--cache-location "${HOME}"/carton-cache \
9697
--destination "${HOME}"/buildpack \
9798
--include-dependencies \
9899
--version "${VERSION}"
99100
else
100101
create-package \
102+
--source ${SOURCE_PATH:-.} \
101103
--destination "${HOME}"/buildpack \
102104
--version "${VERSION}"
103105
fi
104106
105-
[[ -e package.toml ]] && cp package.toml "${HOME}"/package.toml
107+
PACKAGE_FILE=${SOURCE_PATH:-.}/package.toml
108+
[[ -e ${PACKAGE_FILE} ]] && cp ${PACKAGE_FILE} "${HOME}"/package.toml
106109
printf '[buildpack]\nuri = "%s"\n\n[platform]\nos = "%s"\n' "${HOME}"/buildpack "${OS}" >> "${HOME}"/package.toml
107110
env:
108111
INCLUDE_DEPENDENCIES: "true"
@@ -114,13 +117,13 @@ jobs:
114117
115118
set -euo pipefail
116119
117-
if [[ -n "${PUBLISH+x}" ]]; then
120+
if [[ "${PUBLISH:-x}" == "true" ]]; then
118121
pack buildpack package \
119122
"${PACKAGE}:${VERSION}" \
120123
--config "${HOME}"/package.toml \
121124
--publish
122125
123-
if [ ! -z ${VERSION_MINOR} ] && [ ! -z ${VERSION_MAJOR} ]; then
126+
if [[ -n ${VERSION_MINOR:-} && -n ${VERSION_MAJOR:-} ]]; then
124127
crane tag "${PACKAGE}:${VERSION}" "${VERSION_MINOR}"
125128
crane tag "${PACKAGE}:${VERSION}" "${VERSION_MAJOR}"
126129
fi

0 commit comments

Comments
 (0)