Skip to content

Commit ff85c66

Browse files
committed
Repackage unstable release for 0.4.2 cd3ee1c
1 parent a784c42 commit ff85c66

File tree

3 files changed

+33
-14
lines changed

3 files changed

+33
-14
lines changed

docs/changes.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
Changelog
22
=========
33

4+
Unstable version 0.4.2.20140529.cd3ee1cbe3
5+
------------------------------------------
6+
7+
Released on May 29, 2014.
8+
9+
- Version scheme changed to use periods (``.``) instead of hyphens (``-``)
10+
due to setuptools seems to treat hyphens special.
11+
- Fixed malformed packaging that doesn't correctly preserve the package name
12+
and version.
13+
14+
415
Unstable Version 0.4.2-20140528-cd3ee1cbe3
516
------------------------------------------
617

release-unstable.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
commit=$1
3+
if [[ "$commit" = "" ]]; then
4+
echo "missing argument: commit sha1" 1>&2
5+
exit 1
6+
fi
7+
git show -q $commit || exit 1
8+
echo $commit > .unstable-release
9+
echo include .unstable-release >> MANIFEST.in
10+
python setup.py sdist upload
11+
git checkout MANIFEST.in
12+
rm .unstable-release

setup.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,15 @@ def version(sass_filename='sass.py'):
100100
return node.value.s
101101

102102

103-
def current_branch():
104-
if os.path.isdir('.git'):
105-
try:
106-
with os.popen('git branch') as f:
107-
for line in f:
108-
line = line.strip()
109-
if line.startswith('*'):
110-
return line.split()[1]
111-
except (IOError, OSError):
112-
pass
113-
return
103+
def get_unstable_commit():
104+
try:
105+
with open('.unstable-release') as f:
106+
return f.read().strip() or None
107+
except (IOError, OSError):
108+
return
114109

115110

116-
unstable = current_branch() == 'unstable'
111+
unstable_commit = get_unstable_commit()
117112

118113

119114
def readme():
@@ -153,11 +148,12 @@ def run(self):
153148

154149

155150
setup(
156-
name='libsass' + ('-unstable' if unstable else ''),
151+
name='libsass' + ('-unstable' if unstable_commit else ''),
157152
description='SASS for Python: '
158153
'A straightforward binding of libsass for Python.',
159154
long_description=readme(),
160-
version=version() + (time.strftime('-%Y%m%d') if unstable else ''),
155+
version=version() + (time.strftime('.%Y%m%d.') + unstable_commit
156+
if unstable_commit else ''),
161157
ext_modules=[sass_extension],
162158
packages=['sassutils'],
163159
py_modules=['sass', 'sassc', 'sasstests'],

0 commit comments

Comments
 (0)