mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-12 15:59:58 -05:00
Add .version file when generating source tarball
This commit is contained in:
parent
3089894d20
commit
32a4078240
16
release-tool
16
release-tool
@ -614,9 +614,19 @@ build() {
|
|||||||
if ${BUILD_SOURCE_TARBALL}; then
|
if ${BUILD_SOURCE_TARBALL}; then
|
||||||
logInfo "Creating source tarball..."
|
logInfo "Creating source tarball..."
|
||||||
local app_name_lower="$(echo "$APP_NAME" | tr '[:upper:]' '[:lower:]')"
|
local app_name_lower="$(echo "$APP_NAME" | tr '[:upper:]' '[:lower:]')"
|
||||||
TARBALL_NAME="${app_name_lower}-${RELEASE_NAME}-src.tar.xz"
|
local prefix="${app_name_lower}-${RELEASE_NAME}"
|
||||||
git archive --format=tar "$TAG_NAME" --prefix="${app_name_lower}-${RELEASE_NAME}/" \
|
local tarball_name="${prefix}-src.tar"
|
||||||
| xz -6 > "${OUTPUT_DIR}/${TARBALL_NAME}"
|
|
||||||
|
git archive --format=tar "$TAG_NAME" --prefix="${prefix}/" --output="${OUTPUT_DIR}/${tarball_name}"
|
||||||
|
|
||||||
|
# add .version file to tar
|
||||||
|
mkdir "${prefix}"
|
||||||
|
echo -n ${RELEASE_NAME} > "${prefix}/.version"
|
||||||
|
tar --append --file="${OUTPUT_DIR}/${tarball_name}" "${prefix}/.version"
|
||||||
|
rm "${prefix}/.version"
|
||||||
|
rmdir "${prefix}" 2> /dev/null
|
||||||
|
|
||||||
|
xz -6 "${OUTPUT_DIR}/${tarball_name}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "${OUTPUT_DIR}/build-release" ]; then
|
if [ -e "${OUTPUT_DIR}/build-release" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user