mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-24 23:09:44 -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
|
||||
logInfo "Creating source tarball..."
|
||||
local app_name_lower="$(echo "$APP_NAME" | tr '[:upper:]' '[:lower:]')"
|
||||
TARBALL_NAME="${app_name_lower}-${RELEASE_NAME}-src.tar.xz"
|
||||
git archive --format=tar "$TAG_NAME" --prefix="${app_name_lower}-${RELEASE_NAME}/" \
|
||||
| xz -6 > "${OUTPUT_DIR}/${TARBALL_NAME}"
|
||||
local prefix="${app_name_lower}-${RELEASE_NAME}"
|
||||
local tarball_name="${prefix}-src.tar"
|
||||
|
||||
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
|
||||
|
||||
if [ -e "${OUTPUT_DIR}/build-release" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user