Skip to content

Commit a1ecef8

Browse files
committed
ver 0.3.0
1 parent e0a38ce commit a1ecef8

File tree

4 files changed

+38
-165
lines changed

4 files changed

+38
-165
lines changed

copyparty/__version__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# coding: utf-8
22

3-
VERSION = (0, 2, 3)
3+
VERSION = (0, 3, 0)
44
CODENAME = "docuparty"
5-
BUILD_DT = (2020, 5, 3)
5+
BUILD_DT = (2020, 5, 6)
66

77
S_VERSION = ".".join(map(str, VERSION))
88
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)

scripts/make-pypi-release.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ set -e
33
echo
44

55
# osx support
6-
sed=$( which gsed 2>/dev/null || which sed)
7-
find=$(which gfind 2>/dev/null || which find)
8-
sort=$(which gsort 2>/dev/null || which sort)
6+
command -v gtar >/dev/null &&
7+
command -v gfind >/dev/null && {
8+
tar() { gtar "$@"; }
9+
sed() { gsed "$@"; }
10+
find() { gfind "$@"; }
11+
sort() { gsort "$@"; }
12+
}
913

1014
which md5sum 2>/dev/null >/dev/null &&
1115
md5sum=md5sum ||

scripts/make-tgz-release.sh

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
set -e
33
echo
44

5-
tar=$( which gtar 2>/dev/null || which tar)
6-
sed=$( which gsed 2>/dev/null || which sed)
7-
find=$(which gfind 2>/dev/null || which find)
8-
sort=$(which gsort 2>/dev/null || which sort)
5+
command -v gtar >/dev/null &&
6+
command -v gfind >/dev/null && {
7+
tar() { gtar "$@"; }
8+
sed() { gsed "$@"; }
9+
find() { gfind "$@"; }
10+
sort() { gsort "$@"; }
11+
}
912

1013
which md5sum 2>/dev/null >/dev/null &&
1114
md5sum=md5sum ||
@@ -29,8 +32,8 @@ ver="$1"
2932
}
3033

3134
mkdir -p dist
32-
zip_path="dist/copyparty-$ver.zip"
33-
tgz_path="dist/copyparty-$ver.tar.gz"
35+
zip_path="$(pwd)/dist/copyparty-$ver.zip"
36+
tgz_path="$(pwd)/dist/copyparty-$ver.tar.gz"
3437

3538
[[ -e "$zip_path" ]] ||
3639
[[ -e "$tgz_path" ]] &&
@@ -45,21 +48,21 @@ tgz_path="dist/copyparty-$ver.tar.gz"
4548
rm "$zip_path" 2>/dev/null || true
4649
rm "$tgz_path" 2>/dev/null || true
4750

48-
#$sed -ri "s/^(ADMIN_PWD *= *u).*/\1'hunter2'/" copyparty/config.py
51+
#sed -ri "s/^(ADMIN_PWD *= *u).*/\1'hunter2'/" copyparty/config.py
4952

5053
tmp="$(mktemp -d)"
5154
rls_dir="$tmp/copyparty-$ver"
5255
mkdir "$rls_dir"
5356

5457
echo ">>> export from git"
55-
git archive master | $tar -xC "$rls_dir"
58+
git archive master | tar -xC "$rls_dir"
5659

5760
echo ">>> export untracked deps"
58-
$tar -c copyparty/web/deps | $tar -xC "$rls_dir"
61+
tar -c copyparty/web/deps | tar -xC "$rls_dir"
5962

6063
cd "$rls_dir"
61-
$find -type d -exec chmod 755 '{}' \+
62-
$find -type f -exec chmod 644 '{}' \+
64+
find -type d -exec chmod 755 '{}' \+
65+
find -type f -exec chmod 644 '{}' \+
6366

6467
commaver="$(
6568
printf '%s\n' "$ver" |
@@ -88,16 +91,23 @@ rm \
8891

8992
mv LICENSE LICENSE.txt
9093

91-
# messy because osx support
92-
$find -type f -exec $md5sum '{}' \+ |
93-
$sed -r 's/(.{32})(.*)/\2\1/' | LC_COLLATE=c $sort |
94-
$sed -r 's/(.*)(.{32})/\2\1/' |
95-
$sed -r 's/^(.{32}) \./\1 ./' > ../.sums.md5
94+
# the regular cleanup memes
95+
find -name '*.pyc' -delete
96+
find -name __pycache__ -delete
97+
find -type f \( -name .DS_Store -or -name ._.DS_Store \) -delete
98+
find -type f -name ._\* | while IFS= read -r f; do cmp <(printf '\x00\x05\x16') <(head -c 3 -- "$f") && rm -f -- "$f"; done
99+
100+
# also messy because osx support
101+
find -type f -exec $md5sum '{}' \+ |
102+
sed -r 's/(.{32})(.*)/\2\1/' | LC_COLLATE=c sort |
103+
sed -r 's/(.*)(.{32})/\2\1/' |
104+
sed -r 's/^(.{32}) \./\1 ./' > ../.sums.md5
96105
mv ../.sums.md5 .
97106

98107
cd ..
99-
echo ">>> tar"; $tar -czf "$tgz_path" "copyparty-$ver"
100-
echo ">>> zip"; zip -qr "$zip_path" "copyparty-$ver"
108+
pwd
109+
echo ">>> tar"; tar -czf "$tgz_path" --owner=1000 --group=1000 --numeric-owner "copyparty-$ver"
110+
echo ">>> zip"; zip -qr "$zip_path" "copyparty-$ver"
101111

102112
rm -rf "$tmp"
103113
echo
@@ -106,5 +116,5 @@ echo " $zip_path"
106116
echo " $tgz_path"
107117
echo
108118

109-
# function alr() { ls -alR copyparty-$1 | $sed -r "s/copyparty-$1/copyparty/" | $sed -r 's/[A-Z][a-z]{2} [0-9 ]{2} [0-9]{2}:[0-9]{2}//' > $1; }; for x in master rls src ; do alr $x; done
119+
# function alr() { ls -alR copyparty-$1 | sed -r "s/copyparty-$1/copyparty/" | sed -r 's/[A-Z][a-z]{2} [0-9 ]{2} [0-9]{2}:[0-9]{2}//' > $1; }; for x in master rls src ; do alr $x; done
110120

scripts/make-unix-sfx.sh

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)