From a5db3c94c7c0fe033397f2d84e7276b77c26626d Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 8 Oct 2016 16:30:42 +1300 Subject: [PATCH] include config file in build artefacts --- .hgignore | 1 + build.sh | 8 ++++++-- nmdc-webfrontend.conf => nmdc-webfrontend.conf.SAMPLE | 0 3 files changed, 7 insertions(+), 2 deletions(-) rename nmdc-webfrontend.conf => nmdc-webfrontend.conf.SAMPLE (100%) diff --git a/.hgignore b/.hgignore index d58532a..f487dbf 100644 --- a/.hgignore +++ b/.hgignore @@ -1,6 +1,7 @@ mode:regex \.exe$ +^nmdc-webfrontend\.conf$ ^_dist/ ^bindata\.go$ \ No newline at end of file diff --git a/build.sh b/build.sh index 6cffd23..fa67c34 100644 --- a/build.sh +++ b/build.sh @@ -20,6 +20,10 @@ set -eu DIST_DIR=./_dist +EXTRA_FILES=( + nmdc-webfrontend.conf.SAMPLE +) + get_package_name() { # Binaries are named after the containing folder. pwd | tr / $'\n' | tail -n1 @@ -96,10 +100,10 @@ single_build() { local archive_name="${DIST_DIR}/$(get_package_name)-${version}-${platform}" if [[ $GOOS == windows ]] ; then archive_name="${archive_name}.7z" - 7z a -mx9 "$archive_name" "${tmpdir}/${local_bin_name}" >/dev/null + 7z a -mx9 "$archive_name" "${tmpdir}/${local_bin_name}" "${EXTRA_FILES[@]}" >/dev/null else archive_name="${archive_name}.tar.xz" - XZ_OPT='-9' tar caf "$archive_name" -C "${tmpdir}" "${local_bin_name}" --owner=0 --group=0 >/dev/null + XZ_OPT='-9' tar caf "$archive_name" -C "${tmpdir}" "${local_bin_name}" -C "$(pwd)" "${EXTRA_FILES[@]}" --owner=0 --group=0 >/dev/null fi # Cleanup diff --git a/nmdc-webfrontend.conf b/nmdc-webfrontend.conf.SAMPLE similarity index 100% rename from nmdc-webfrontend.conf rename to nmdc-webfrontend.conf.SAMPLE