Skip to content

Commit f9134b1

Browse files
authored
Merge pull request #113 from ggtakec/update_build_tool
Eliminated unnecessary copies in build_helper.sh
2 parents 6e0afb8 + c60ff3e commit f9134b1

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

.github/workflows/build_helper.sh

+6-14
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ run_publish_package()
416416
PRNERR "Token for uploading to packagecloud.io is not specified."
417417
return 1
418418
fi
419-
if ! PACKAGECLOUD_TOKEN="${CI_PACKAGECLOUD_TOKEN}" /bin/sh -c "package_cloud push ${CI_PACKAGECLOUD_OWNER}/${CI_PACKAGECLOUD_PUBLISH_REPO}/${DIST_TAG} ${BUILD_SRCTOP}/${PKG_OUTPUT_DIR}/*.${PKG_EXT}"; then
419+
if ! PACKAGECLOUD_TOKEN="${CI_PACKAGECLOUD_TOKEN}" /bin/sh -c "package_cloud push ${CI_PACKAGECLOUD_OWNER}/${CI_PACKAGECLOUD_PUBLISH_REPO}/${DIST_TAG} ${SRCTOP}/${PKG_OUTPUT_DIR}/*.${PKG_EXT}"; then
420420
PRNERR "Failed to publish *.${PKG_EXT} packages to ${CI_PACKAGECLOUD_OWNER}/${CI_PACKAGECLOUD_PUBLISH_REPO}/${DIST_TAG}"
421421
return 1
422422
fi
@@ -1235,24 +1235,16 @@ PRNSUCCESS "Install shellcheck"
12351235
#==============================================================
12361236
# Processing
12371237
#==============================================================
1238-
#
1239-
# Copy source code to temporary directory
1240-
#
1241-
PRNTITLE "Copy source code to temporary directory"
1242-
if ! RUNCMD cp -rp "${SRCTOP}" /tmp; then
1243-
PRNERR "Failed to copy source code to temporary directory"
1244-
exit 1
1245-
fi
1246-
BUILD_SRCTOP="/tmp/$(basename "${SRCTOP}")"
1247-
12481238
#
12491239
# Change current directory
12501240
#
1251-
if ! RUNCMD cd "${BUILD_SRCTOP}"; then
1252-
PRNERR "Failed to chnage current directory to ${BUILD_SRCTOP}"
1241+
PRNTITLE "Change current directory"
1242+
1243+
if ! RUNCMD cd "${SRCTOP}"; then
1244+
PRNERR "Failed to chnage current directory to ${SRCTOP}"
12531245
exit 1
12541246
fi
1255-
PRNSUCCESS "Copy source code to temporary directory"
1247+
PRNSUCCESS "Changed current directory"
12561248

12571249
#--------------------------------------------------------------
12581250
# Configuration

0 commit comments

Comments
 (0)