mirror of
https://github.com/YACReader/yacreader
synced 2025-05-25 09:50:33 -04:00
Update mktarball.sh for git usage (needs .gitattributes).
This commit is contained in:
parent
381c0f6560
commit
335a3a0cdb
8
.gitattributes
vendored
Normal file
8
.gitattributes
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# List files and directories to exclude from git archive
|
||||
/dependencies/pdfium export-ignore
|
||||
/dependencies/poppler export-ignore
|
||||
/dependencies/qrencode export-ignore
|
||||
/dependencies/unarr export-ignore
|
||||
/dependencies/create-dmg export-ignore
|
||||
.gitignore export-ignore
|
||||
.gitattributes export-ignore
|
15
mktarball.sh
15
mktarball.sh
@ -1,20 +1,19 @@
|
||||
#! /bin/bash
|
||||
#Script to create a source tarball for YACReader distribution and packaging
|
||||
#This should be run from YACReaders top source directory
|
||||
#By default this will use the latest git tag for the current branch or whatever
|
||||
#version supplied as argument
|
||||
#This should be run from YACReader's top source directory
|
||||
|
||||
YACVERSION=9.0.0
|
||||
YACVERSION=${1:-`git describe --long --tags`}
|
||||
if [ ! -f "yacreader-${YACVERSION}-src.tar.xz" ]
|
||||
then
|
||||
echo "Building source tarball"
|
||||
echo "Building source tarball for ${YACVERSION}"
|
||||
else
|
||||
echo "Updating source tarball"
|
||||
echo "Updating source tarball for ${YACVERSION}"
|
||||
rm yacreader-${YACVERSION}-src.tar* #delete old tarball, since tar can't update compressed archives
|
||||
fi
|
||||
|
||||
hg archive -t tar -p yacreader-${YACVERSION} -X "dependencies/{unarr,pdfium,poppler}"\
|
||||
yacreader-${YACVERSION}-src.tar
|
||||
xz -c yacreader-${YACVERSION}-src.tar > yacreader-${YACVERSION}-src.tar.xz
|
||||
rm yacreader-${YACVERSION}-src.tar
|
||||
git archive --format=tar --prefix=yacreader-${YACVERSION}/ HEAD | xz -c > yacreader-${YACVERSION}-src.tar.xz
|
||||
|
||||
#Calculate checksum to enable packagers to verify whether they are using the original tarball.
|
||||
md5sum yacreader-${YACVERSION}-src.tar.xz > yacreader-${YACVERSION}-src.tar.xz.md5sum
|
||||
|
Loading…
Reference in New Issue
Block a user