build: create source-only tarball in release.sh
This commit is contained in:
@@ -46,7 +46,25 @@ fi
|
|||||||
find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
|
find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
|
||||||
|
|
||||||
# note: .zip sdists would not be reproducible due to https://bugs.python.org/issue40963
|
# note: .zip sdists would not be reproducible due to https://bugs.python.org/issue40963
|
||||||
TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar
|
if ([ "$OMIT_UNCLEAN_FILES" = 1 ])
|
||||||
|
then PY_DISTDIR="dist/_sourceonly" # The DISTDIR variable of this script is only used to find where the output is *finally* placed.
|
||||||
|
else PY_DISTDIR="dist"
|
||||||
|
fi
|
||||||
|
TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar --dist-dir="$PY_DISTDIR"
|
||||||
|
if ([ "$OMIT_UNCLEAN_FILES" = 1 ]); then
|
||||||
|
for fn in "$DISTDIR/_sourceonly/"*; do
|
||||||
|
# Since ELECTRUM_VERSION is not available to us in this script, we have to use a regex.
|
||||||
|
# Expression 1: Electrum-X.Y.Z.tar.gz -> Electrum-sourceonly-X.Y.Z.tar.gz
|
||||||
|
# Capture group \1 = Electrum
|
||||||
|
# Capture group \2 = X.Y.Z.tar.gz
|
||||||
|
# Expression 2: dist/_sourceonly/X.tar.gz -> dist/X.tar.gz
|
||||||
|
mv "$fn" $(sed \
|
||||||
|
-e 's/\(.*\)-\([^-]*\)/\1-sourceonly-\2/' \
|
||||||
|
-e 's/\/_sourceonly//' \
|
||||||
|
<<< "$fn")
|
||||||
|
done
|
||||||
|
rmdir "$PY_DISTDIR"
|
||||||
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,14 @@ else
|
|||||||
./contrib/build-linux/sdist/build.sh
|
./contrib/build-linux/sdist/build.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# create source-only tarball
|
||||||
|
srctarball="Electrum-sourceonly-$VERSION.tar.gz"
|
||||||
|
if test -f "dist/$srctarball"; then
|
||||||
|
info "file exists: $srctarball"
|
||||||
|
else
|
||||||
|
OMIT_UNCLEAN_FILES=1 ./contrib/build-linux/sdist/build.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# appimage
|
# appimage
|
||||||
appimage="electrum-$REV-x86_64.AppImage"
|
appimage="electrum-$REV-x86_64.AppImage"
|
||||||
if test -f "dist/$appimage"; then
|
if test -f "dist/$appimage"; then
|
||||||
@@ -186,15 +194,17 @@ if [ -z "$RELEASEMANAGER" ] ; then
|
|||||||
bye
|
bye
|
||||||
!
|
!
|
||||||
# check we have each binary
|
# check we have each binary
|
||||||
test -f "$tarball" || fail "tarball not found among sftp downloads"
|
test -f "$tarball" || fail "tarball not found among sftp downloads"
|
||||||
test -f "$appimage" || fail "appimage not found among sftp downloads"
|
test -f "$srctarball" || fail "srctarball not found among sftp downloads"
|
||||||
test -f "$win1" || fail "win1 not found among sftp downloads"
|
test -f "$appimage" || fail "appimage not found among sftp downloads"
|
||||||
test -f "$win2" || fail "win2 not found among sftp downloads"
|
test -f "$win1" || fail "win1 not found among sftp downloads"
|
||||||
test -f "$win3" || fail "win3 not found among sftp downloads"
|
test -f "$win2" || fail "win2 not found among sftp downloads"
|
||||||
test -f "$apk1" || fail "apk1 not found among sftp downloads"
|
test -f "$win3" || fail "win3 not found among sftp downloads"
|
||||||
test -f "$apk2" || fail "apk2 not found among sftp downloads"
|
test -f "$apk1" || fail "apk1 not found among sftp downloads"
|
||||||
test -f "$dmg" || fail "dmg not found among sftp downloads"
|
test -f "$apk2" || fail "apk2 not found among sftp downloads"
|
||||||
|
test -f "$dmg" || fail "dmg not found among sftp downloads"
|
||||||
test -f "$PROJECT_ROOT/dist/$tarball" || fail "tarball not found among built files"
|
test -f "$PROJECT_ROOT/dist/$tarball" || fail "tarball not found among built files"
|
||||||
|
test -f "$PROJECT_ROOT/dist/$srctarball" || fail "tarball not found among built files"
|
||||||
test -f "$PROJECT_ROOT/dist/$appimage" || fail "appimage not found among built files"
|
test -f "$PROJECT_ROOT/dist/$appimage" || fail "appimage not found among built files"
|
||||||
test -f "$CONTRIB/build-wine/dist/$win1" || fail "win1 not found among built files"
|
test -f "$CONTRIB/build-wine/dist/$win1" || fail "win1 not found among built files"
|
||||||
test -f "$CONTRIB/build-wine/dist/$win2" || fail "win2 not found among built files"
|
test -f "$CONTRIB/build-wine/dist/$win2" || fail "win2 not found among built files"
|
||||||
@@ -203,8 +213,9 @@ if [ -z "$RELEASEMANAGER" ] ; then
|
|||||||
test -f "$PROJECT_ROOT/dist/$apk2" || fail "apk2 not found among built files"
|
test -f "$PROJECT_ROOT/dist/$apk2" || fail "apk2 not found among built files"
|
||||||
test -f "$PROJECT_ROOT/dist/$dmg" || fail "dmg not found among built files"
|
test -f "$PROJECT_ROOT/dist/$dmg" || fail "dmg not found among built files"
|
||||||
# compare downloaded binaries against ones we built
|
# compare downloaded binaries against ones we built
|
||||||
cmp --silent "$tarball" "$PROJECT_ROOT/dist/$tarball" || fail "files are different. tarball."
|
cmp --silent "$tarball" "$PROJECT_ROOT/dist/$tarball" || fail "files are different. tarball."
|
||||||
cmp --silent "$appimage" "$PROJECT_ROOT/dist/$appimage" || fail "files are different. appimage."
|
cmp --silent "$srctarball" "$PROJECT_ROOT/dist/$srctarball" || fail "files are different. srctarball."
|
||||||
|
cmp --silent "$appimage" "$PROJECT_ROOT/dist/$appimage" || fail "files are different. appimage."
|
||||||
rm -rf "$CONTRIB/build-wine/signed/" && mkdir --parents "$CONTRIB/build-wine/signed/"
|
rm -rf "$CONTRIB/build-wine/signed/" && mkdir --parents "$CONTRIB/build-wine/signed/"
|
||||||
cp -f "$win1" "$win2" "$win3" "$CONTRIB/build-wine/signed/"
|
cp -f "$win1" "$win2" "$win3" "$CONTRIB/build-wine/signed/"
|
||||||
"$CONTRIB/build-wine/unsign.sh" || fail "files are different. windows."
|
"$CONTRIB/build-wine/unsign.sh" || fail "files are different. windows."
|
||||||
@@ -214,7 +225,7 @@ if [ -z "$RELEASEMANAGER" ] ; then
|
|||||||
# all files matched. sign them.
|
# all files matched. sign them.
|
||||||
rm -rf "$PROJECT_ROOT/dist/sigs/"
|
rm -rf "$PROJECT_ROOT/dist/sigs/"
|
||||||
mkdir --parents "$PROJECT_ROOT/dist/sigs/"
|
mkdir --parents "$PROJECT_ROOT/dist/sigs/"
|
||||||
for fname in "$tarball" "$appimage" "$win1" "$win2" "$win3" "$apk1" "$apk2" "$dmg" ; do
|
for fname in "$tarball" "$srctarball" "$appimage" "$win1" "$win2" "$win3" "$apk1" "$apk2" "$dmg" ; do
|
||||||
signame="$fname.$GPGUSER.asc"
|
signame="$fname.$GPGUSER.asc"
|
||||||
gpg --sign --armor --detach $PUBKEY --output "$PROJECT_ROOT/dist/sigs/$signame" "$fname"
|
gpg --sign --armor --detach $PUBKEY --output "$PROJECT_ROOT/dist/sigs/$signame" "$fname"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user