Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Commit

Permalink
Prepare 3.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinDuquesnoy committed Oct 21, 2017
1 parent 0a775f1 commit 32f5140
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 107 deletions.
4 changes: 2 additions & 2 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
unreleased=true
future-release=3.0.0
future-release=3.1.0
since-tag=2.2.5
exclude-tags=Continuous
exclude_labels=duplicate,question,invalid,wontfix,rejected,infrastructure,technical task,packaging
exclude_labels=duplicate,question,invalid,wontfix,rejected,infrastructure,technical task,packaging,news
issues-wo-labels=false
enhancement-labels=feature
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Change Log

## [3.1.0](https://github.com/ColinDuquesnoy/MellowPlayer/tree/3.1.0) (2017-10-21)
[Full Changelog](https://github.com/ColinDuquesnoy/MellowPlayer/compare/3.0.0...3.1.0)

**Implemented enhancements:**

- Add ambiance theme for ubuntu [\#138](https://github.com/ColinDuquesnoy/MellowPlayer/issues/138)
- Add support for ympd [\#118](https://github.com/ColinDuquesnoy/MellowPlayer/issues/118)
- Add a dustbin icon where users can drag a service icon to disable the service [\#116](https://github.com/ColinDuquesnoy/MellowPlayer/issues/116)
- Add ability to specify list of supported platforms for a plugin [\#115](https://github.com/ColinDuquesnoy/MellowPlayer/issues/115)
- \[Feature request\] Zoom [\#114](https://github.com/ColinDuquesnoy/MellowPlayer/issues/114)
- Integrate Catalan translation [\#111](https://github.com/ColinDuquesnoy/MellowPlayer/issues/111)
- Integrate Spanish translation [\#110](https://github.com/ColinDuquesnoy/MellowPlayer/issues/110)
- Add a function to change the user agent in the settings [\#102](https://github.com/ColinDuquesnoy/MellowPlayer/issues/102)
- Add Radionomy [\#100](https://github.com/ColinDuquesnoy/MellowPlayer/issues/100)
- Add JAMENDO MUSIC [\#83](https://github.com/ColinDuquesnoy/MellowPlayer/issues/83)
- Add shortcut to open web developer tools [\#80](https://github.com/ColinDuquesnoy/MellowPlayer/issues/80)
- MPRIS: Use favorite song info [\#79](https://github.com/ColinDuquesnoy/MellowPlayer/issues/79)
- Add hearthis.at [\#75](https://github.com/ColinDuquesnoy/MellowPlayer/issues/75)
- Add support for user scripts [\#69](https://github.com/ColinDuquesnoy/MellowPlayer/issues/69)

**Fixed bugs:**

- Drag & Drop to trash icon does not always work [\#136](https://github.com/ColinDuquesnoy/MellowPlayer/issues/136)
- TuneIn integration broken [\#133](https://github.com/ColinDuquesnoy/MellowPlayer/issues/133)
- Mixcloud integration plugin broken [\#108](https://github.com/ColinDuquesnoy/MellowPlayer/issues/108)

**Closed issues:**

- Deezer - playback switches to random songs [\#127](https://github.com/ColinDuquesnoy/MellowPlayer/issues/127)
- mellowplayer.desktop does not pass desktop-file-validate [\#104](https://github.com/ColinDuquesnoy/MellowPlayer/issues/104)
- Buttons not translatable [\#101](https://github.com/ColinDuquesnoy/MellowPlayer/issues/101)

**Merged pull requests:**

- Add favorites support to soundcloud plugin [\#134](https://github.com/ColinDuquesnoy/MellowPlayer/pull/134) ([Cogitri](https://github.com/Cogitri))
- GPM: improve playback status detection [\#129](https://github.com/ColinDuquesnoy/MellowPlayer/pull/129) ([terinjokes](https://github.com/terinjokes))
- Add Wynk Music plugin [\#125](https://github.com/ColinDuquesnoy/MellowPlayer/pull/125) ([shreyanshk](https://github.com/shreyanshk))
- Update Readme.md [\#123](https://github.com/ColinDuquesnoy/MellowPlayer/pull/123) ([ZeroDot1](https://github.com/ZeroDot1))
- README.md updated [\#122](https://github.com/ColinDuquesnoy/MellowPlayer/pull/122) ([ZeroDot1](https://github.com/ZeroDot1))
- Anghami [\#120](https://github.com/ColinDuquesnoy/MellowPlayer/pull/120) ([mahmoudhossam](https://github.com/mahmoudhossam))
- Add a Gitter chat badge to README.md [\#119](https://github.com/ColinDuquesnoy/MellowPlayer/pull/119) ([gitter-badger](https://github.com/gitter-badger))
- Feature pocketcasts plugin [\#117](https://github.com/ColinDuquesnoy/MellowPlayer/pull/117) ([kolletzki](https://github.com/kolletzki))
- Fix Buttons not translatable / archlinux-env-setup.sh [\#103](https://github.com/ColinDuquesnoy/MellowPlayer/pull/103) ([ZeroDot1](https://github.com/ZeroDot1))

## [3.0.0](https://github.com/ColinDuquesnoy/MellowPlayer/tree/3.0.0) (2017-08-13)
[Full Changelog](https://github.com/ColinDuquesnoy/MellowPlayer/compare/2.99.0...3.0.0)

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (NOT BUILD_NUMBER)
endif()


project(MellowPlayer VERSION 3.0.50.${BUILD_NUMBER})
project(MellowPlayer VERSION 3.1.0.${BUILD_NUMBER})
set(CMAKE_VERBOSE_MAKEFILE FALSE)
# cache version in CMakeCache.txt, so that script can easily query current version
set(MELLOWPLAYER_VERSION "${MellowPlayer_VERSION}" CACHE STRING "")
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ notifications and more).
- [Anghami](https://www.anghami.com/)
- [Pocket Casts](https://play.pocketcasts.com/)
- [HearThisAt](https://hearthis.at/)
- [Jamendo](https://www.jamendo.com/start)
- [Radionomy](https://www.radionomy.com/)
- [Wynk](https://www.wynk.in/music)
- [ympd](https://github.com/notandy/ympd)

# User Scripts:
With MellowPlayer 3.1 you have the possibility to use user scripts.
Expand Down
106 changes: 2 additions & 104 deletions scripts/promotion/promotions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import re
import subprocess
from enum import Enum
from github3 import login


class Type(Enum):
Expand All @@ -24,42 +23,6 @@ def __eq__(self, other):
return self.major == other.major and self.minor == other.minor and self.patch == other.patch


class Git:
@staticmethod
def get_branch():
return subprocess.check_output(['git', 'branch']).decode().replace('* ', '').splitlines()[0]

@staticmethod
def commit_and_push():
subprocess.check_output(["git", "commit", "-a", "-m", "Prepare release"])
Git.push()

@staticmethod
def create_tag(tag_name):
subprocess.check_output(["git", "tag", "-a", tag_name, '-m', tag_name])
subprocess.check_output(["git", "push", 'origin', tag_name])

@staticmethod
def checkout(branch):
subprocess.check_output(['git', 'checkout', branch])

@staticmethod
def merge(branch):
subprocess.check_output(['git', 'merge', branch])

@staticmethod
def push():
subprocess.check_output(["git", "push"])


class Github:
@staticmethod
def create_release(name, description, prerelease):
gh = login(username='ColinDuquesnoy', token=os.environ['CHANGELOG_GITHUB_TOKEN'])
repo = gh.repository('ColinDuquesnoy', 'MellowPlayer')
repo.create_release(name, name=name, body=description, prerelease=prerelease)


class Promotion:
def __init__(self, promotion_type, required_branch, prerelease=False):
self.prerelease = prerelease
Expand All @@ -70,9 +33,6 @@ def __init__(self, promotion_type, required_branch, prerelease=False):

def execute(self):
self.new_version = self.read_cmake_version()
git_branch = Git.get_branch()
if git_branch != self.required_branch:
raise RuntimeError("Cannot perform promotion on %s branch" % git_branch)
self.new_version = self.bump_version(self.initial_version)
print('Promoting v%s to v%s' % (self.initial_version, self.new_version))
self.write_cmake_version(self.new_version)
Expand All @@ -83,38 +43,6 @@ def execute(self):

input("check cmake changes and updated changelog and press ENTER if everything is OK")

Git.commit_and_push()

if self.required_branch == "develop" and not self.prerelease:
# merge develop into master
Git.checkout("master")
Git.merge("develop")

Git.create_tag(str(self.new_version))
Github.create_release(str(self.new_version), self.get_latest_changelog_entry(), prerelease=self.prerelease)
self.update_website()

Git.checkout("develop")
if self.required_branch == 'master':
# switch back to develop and merge master into develop
Git.merge("master")

def get_latest_changelog_entry(self):
with open('CHANGELOG.md') as f:
lines = f.read().splitlines()

record = False
recorded_lines = []
for l in lines:
if l.strip().startswith('##'):
record = not record
if record is False:
break
else:
if record:
recorded_lines.append(l)
return '\n'.join(recorded_lines)

def update_change_log(self):
print('Updating Changelog...')
changelog_generator_cfg = '.github_changelog_generator'
Expand All @@ -130,32 +58,6 @@ def update_change_log(self):
f.write('\n'.join(updated_lines))
subprocess.check_call(['github_changelog_generator'])

def update_website(self):
branch = Git.get_branch()
Git.checkout('gh-pages')
with open('index.html') as f:
lines = f.read().splitlines()
app_image = ' <a href="https://github.com/ColinDuquesnoy/MellowPlayer/releases/download/%s/MellowPlayer-x86_64.AppImage"><img alt="" src="img/features-picto_linux.svg">'
dmg = ' <a href="https://github.com/ColinDuquesnoy/MellowPlayer/releases/download/%s/MellowPlayer.dmg"><img alt="" src="img/features-picto_mac.svg">'
windows_installer = ' <a href="https://github.com/ColinDuquesnoy/MellowPlayer/releases/download/%s/MellowPlayer_Setup.exe"><img alt="" src="img/features-picto_window.svg">'
updated_lines = []
for l in lines:
if l.strip().startswith('<a href="https://github.com/ColinDuquesnoy/MellowPlayer/releases/download'):
if '.AppImage' in l:
updated_lines.append(app_image % self.new_version)
elif '_Setup.exe' in l:
updated_lines.append(windows_installer % self.new_version)
elif '.dmg' in l:
updated_lines.append(dmg % self.new_version)
print(updated_lines[-1])
else:
updated_lines.append(l)

with open('index.html', 'w') as f:
f.write('\n'.join(updated_lines))
Git.commit_and_push()
Git.checkout(branch.strip())

@staticmethod
def pull_translations():
print("Updating translations...")
Expand Down Expand Up @@ -265,12 +167,8 @@ def main(promotion_class, promotion_type):
while 'scripts' in os.getcwd():
os.chdir('..')

answer = input('Press Y to confirm you want to perform a %s[%s]: ' % (promotion_class.__name__, promotion_type)).lower()
if answer == 'y':
promotion = promotion_class(promotion_type)
promotion.execute()
else:
print('nothing to do')
promotion = promotion_class(promotion_type)
promotion.execute()


def public_promotion(promotion_type):
Expand Down

0 comments on commit 32f5140

Please sign in to comment.