Skip to content

Commit

Permalink
Merge pull request #21 from ihsoft/next
Browse files Browse the repository at this point in the history
Release v1.13
  • Loading branch information
ihsoft authored Apr 24, 2019
2 parents 895e005 + fac9ebf commit 1fdfac6
Show file tree
Hide file tree
Showing 14 changed files with 115 additions and 751 deletions.
25 changes: 25 additions & 0 deletions Binaries/KSP-AVC.version
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"NAME": "KSP-AVC Plugin",
"URL": "http://ksp.spacetux.net/avc/KSP-AVC",
"DOWNLOAD": "https://github.com/linuxgurugamer/KSPAddonVersionChecker/releases",
"GITHUB": {
"USERNAME": "linuxgurugamer",
"REPOSITORY": "KSPAddonVersionChecker"
},
"VERSION": {
"MAJOR": 1,
"MINOR": 3,
"PATCH": 0,
"BUILD": 3
},
"KSP_VERSION": {
"MAJOR": 1,
"MINOR": 5,
"PATCH": 1
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
"MINOR": 5,
"PATCH": 1
}
}
Binary file modified Binaries/MiniAVC.dll
Binary file not shown.
674 changes: 0 additions & 674 deletions Binaries/MiniAVC_License.txt

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.13 (April 23rd, 2019):
* [Change] KSP 1.7 compatibility.

# 1.12 (March 8th, 2019):
* [Fix #19] Compatibility with ReStock mod.

Expand Down
6 changes: 3 additions & 3 deletions Source/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion ("1.12.*")]
[assembly: AssemblyInformationalVersion ("1.12 for KSP v1.6+")]
[assembly: AssemblyVersion ("1.13.*")]
[assembly: AssemblyInformationalVersion ("1.13 for KSP v1.7+")]
[assembly: Guid ("a4d0ab40-75bd-44fb-80bc-f50c194faf4c")]
[assembly: KSPAssembly ("SurfaceLights", 1, 12)]
[assembly: KSPAssembly ("SurfaceLights", 1, 13)]
[assembly: AssemblyFlags (AssemblyNameFlags.PublicKey | AssemblyNameFlags.EnableJITcompileOptimizer)]
12 changes: 6 additions & 6 deletions SurfaceLights.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"DOWNLOAD": "http://forum.kerbalspaceprogram.com/index.php?/topic/139724-surface-mounted-stock-alike-lights-for-self-illumination/",
"KSP_VERSION": {
"MAJOR": 1,
"MINOR": 6,
"MINOR": 7,
"PATCH": 0
},
"KSP_VERSION_MAX": {
"MAJOR": 1,
"MINOR": 6,
"MINOR": 7,
"PATCH": 99
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
"MINOR": 6,
"MINOR": 7,
"PATCH": 0
},
"NAME": "Surface Mounted Lights",
"URL": "https://raw.githubusercontent.com/ihsoft/SurfaceLights/master/SurfaceLights.version",
"VERSION": {
"BUILD": 42726,
"BUILD": 37376,
"MAJOR": 1,
"MINOR": 12,
"PATCH": 7006
"MINOR": 13,
"PATCH": 7052
}
}
30 changes: 11 additions & 19 deletions Tools/PublishCurseForge.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Public domain license.
# Author: igor.zavoychinskiy@gmail.com
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder
# $version: 2
# $date: 10/16/2018
# $version: 4
# $date: 10/28/2018

""" Script to publish releases to Kerbal CurseForge.
Expand Down Expand Up @@ -72,6 +72,7 @@
import textwrap

from clients import CurseForgeClient
from utils import ChangelogUtils


LOGGER = logging.getLogger()
Expand Down Expand Up @@ -138,6 +139,10 @@ def main(argv):
default='.+?_(v.+?)\\.zip',
help='''the RegExp to extract the version tag from the archive name.
[Default: %(default)s]''')
parser.add_argument(
'--github', action='store', metavar='<GitHub>',
help='''the GitHub project and user, separated by "/" symbol. Used when
expanding the GitHub links. Example: "ihsoft/KIS"''')
opts = vars(parser.parse_args(argv[1:]))

project_id = opts['project']
Expand Down Expand Up @@ -166,7 +171,10 @@ def main(argv):
print 'ERROR: No versions found for RegExp: %s' % versions_re
exit(-1)

desc = _ExtractDescription(opts['changelog'], opts['changelog_breaker'])
desc = ChangelogUtils.ExtractDescription(
opts['changelog'], opts['changelog_breaker'])
if opts['github']:
desc = ChangelogUtils.ProcessGitHubLinks(desc, opts['github'])
filename = opts['archive']

if opts['title']:
Expand Down Expand Up @@ -219,20 +227,4 @@ def _Shutdown():
logging.shutdown()


def _ExtractDescription(changelog_file, breaker_re):
"""Helper method to extract the meaningful part of the release changelog."""
with open(changelog_file, 'r') as f:
lines= f.readlines()
changelog = ''
for line in lines:
# Ignore any trailing empty lines.
if not changelog and not line.strip():
continue
# Stop at the breaker.
if re.match(breaker_re, line.strip()):
break
changelog += line
return changelog.strip()


main(sys.argv)
30 changes: 8 additions & 22 deletions Tools/PublishGitHub.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Public domain license.
# Author: igor.zavoychinskiy@gmail.com
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder
# $version: 1
# $date: 07/17/2018
# $version: 2
# $date: 10/28/2018

""" Script to publish releases to GitHub.
Expand All @@ -11,7 +11,7 @@
Example:
$ PublishCurseForge.py\
$ PublishGitHub.py\
--user=my_github_user\
--repo=MyGitHubMod\
--token=1111111111122222222222222333333333333333\
Expand Down Expand Up @@ -40,7 +40,7 @@
Not to mention the quotes and back slashes issues. To avoid all this burden,
simple put all the options into a text file and provide it to the script:
$ PublishCurseForge.py @my_params.txt
$ PublishGitHub.py @my_params.txt
Don't bother about escaping in this file. Anything, placed in a line goes to
the parameter value *as-is*. So you don't need to escape backslashes,
Expand All @@ -67,6 +67,7 @@
import textwrap

from clients import GitHubClient
from utils import ChangelogUtils


LOGGER = logging.getLogger()
Expand Down Expand Up @@ -136,10 +137,11 @@ def main(argv):
user = opts['user']
repo = opts['repo']

# Init CurseForge client.
# Init GitHub client.
GitHubClient.API_TOKEN = opts['token']

desc = _ExtractDescription(opts['changelog'], opts['changelog_breaker'])
desc = ChangelogUtils.ExtractDescription(
opts['changelog'], opts['changelog_breaker'])
filename = opts['archive']
as_draft = opts['as_draft']

Expand Down Expand Up @@ -190,22 +192,6 @@ def _Shutdown():
logging.shutdown()


def _ExtractDescription(changelog_file, breaker_re):
"""Helper method to extract the meaningful part of the release changelog."""
with open(changelog_file, 'r') as f:
lines= f.readlines()
changelog = ''
for line in lines:
# Ignore any trailing empty lines.
if not changelog and not line.strip():
continue
# Stop at the breaker.
if re.match(breaker_re, line.strip()):
break
changelog += line
return changelog.strip()


try:
main(sys.argv)
except Exception, ex:
Expand Down
38 changes: 15 additions & 23 deletions Tools/PublishSpacedock.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Public domain license.
# Author: igor.zavoychinskiy@gmail.com
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder
# $version: 2
# $date: 07/19/2018
# $version: 5
# $date: 10/28/2018

""" Script to publish releases to Spacedock.
Expand All @@ -26,13 +26,13 @@
'*_v<version>.zip'. When it's different, you need to specify the extraction
RegExp:
--tag_extract=.+?_v(.+?)\\.zip
--version_extract=.+?_v(.+?)\\.zip
HINT. Passing all the arguments via the command line may be not convinient.
Not to mention the quotes and back slashes issues. To avoid all this burden,
simple put all the options into a text file and provide it to the script:
$ PublishCurseForge.py @my_params.txt
$ PublishSpacedock.py @my_params.txt
Don't bother about escaping in this file. Anything, placed in a line goes to
the parameter value *as-is*. So you don't need to escape backslashes,
Expand Down Expand Up @@ -62,6 +62,7 @@
import textwrap

from clients import SpacedockClient
from utils import ChangelogUtils


LOGGER = logging.getLogger()
Expand Down Expand Up @@ -113,7 +114,7 @@ def main(argv):
CHANGELOG. This expression is applied per the file line.
[Default: %(default)s]''')
parser.add_argument(
'--tag_extract', action='store', metavar='<regexp>',
'--version_extract', action='store', metavar='<regexp>',
default='.+?_v(.+?)\\.zip',
help='''the RegExp to extract the version tag from the archive name.
[Default: %(default)s]''')
Expand All @@ -125,6 +126,10 @@ def main(argv):
'--pass', action='store', metavar='<SD password>',
help='''the password for the Spacedock account. If not set, then it will
be asked in the command line.''')
parser.add_argument(
'--github', action='store', metavar='<GitHub>',
help='''the GitHub project and user, separated by "/" symbol. Used when
expanding the GitHub links. Example: "ihsoft/KIS"''')
opts = vars(parser.parse_args(argv[1:]))

mod_id = opts['project']
Expand All @@ -149,10 +154,13 @@ def main(argv):
exit(-1)
game_version = all_versions[0]['name']

desc = _ExtractDescription(opts['changelog'], opts['changelog_breaker'])
desc = ChangelogUtils.ExtractDescription(
opts['changelog'], opts['changelog_breaker'])
if opts['github']:
desc = ChangelogUtils.ProcessGitHubLinks(desc, opts['github'])
filename = opts['archive']

parts = re.findall(opts['tag_extract'], os.path.basename(filename))
parts = re.findall(opts['version_extract'], os.path.basename(filename))
if len(parts) != 1:
print 'ERROR: cannot extract version tag from file name: %s' % filename
exit(-1)
Expand Down Expand Up @@ -214,20 +222,4 @@ def _Shutdown():
logging.shutdown()


def _ExtractDescription(changelog_file, breaker_re):
"""Helper method to extract the meaningful part of the release changelog."""
with open(changelog_file, 'r') as f:
lines= f.readlines()
changelog = ''
for line in lines:
# Ignore any trailing empty lines.
if not changelog and not line.strip():
continue
# Stop at the breaker.
if re.match(breaker_re, line.strip()):
break
changelog += line
return changelog.strip()


main(sys.argv)
3 changes: 2 additions & 1 deletion Tools/publish_curseforge_args.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--project=245073
--token=<<SECRET>>
--changelog=../CHANGELOG.md
--github=ihsoft/SurfaceLights
--versions=latest_all_builds
--title=SurfaceLights {tag}
--archive=../SurfaceLights_v1.12.zip
--archive=../SurfaceLights_v1.13.zip
2 changes: 1 addition & 1 deletion Tools/publish_github_args.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
--changelog=../CHANGELOG.md
--as_draft
--title=SurfaceLights v{tag}
--archive=../SurfaceLights_v1.12.zip
--archive=../SurfaceLights_v1.13.zip
3 changes: 2 additions & 1 deletion Tools/publish_spacedock_args.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--project=1911
--login=<<SECRET>>
--changelog=../CHANGELOG.md
--github=ihsoft/SurfaceLights
--ksp_version=latest
--archive=../SurfaceLights_v1.12.zip
--archive=../SurfaceLights_v1.13.zip
3 changes: 2 additions & 1 deletion Tools/release_setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Plugins" : [
"{COMPILED_BINARY}",
"{MINIAVC_VERSION_FILE}",
"/Binaries/*"
"/Binaries/*",
"-KSP-AVC.version"
]
}
}
37 changes: 37 additions & 0 deletions Tools/utils/ChangelogUtils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Public domain license.
# Author: igor.zavoychinskiy@gmail.com
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder
# $version: 1
# $date: 10/28/2018

"""Provides helpers to deal with the markup CHANGELOG file."""
import re


def ExtractDescription(changelog_file, breaker_re):
"""Loads the file and extarcts the lines up to the specified breaker."""
with open(changelog_file, 'r') as f:
lines= f.readlines()
changelog = ''
for line in lines:
# Ignore any trailing empty lines.
if not changelog and not line.strip():
continue
# Stop at the breaker.
if re.match(breaker_re, line.strip()):
break
changelog += line
return changelog.strip()


def ProcessGitHubLinks(markup, github):
"""Replaces the GitHub local links by the external variants."""
markup = re.sub(
r'#(\d+)',
r'[#\1](https://github.com/%s/issues/\1)' % github,
markup)
markup = re.sub(
r'\[(.+?)\]\((wiki/.+?)\)',
r'[\1](https://github.com/%s/\2)' % github,
markup)
return markup

0 comments on commit 1fdfac6

Please sign in to comment.