-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from ihsoft/next
Release v2.3
- Loading branch information
Showing
19 changed files
with
1,950 additions
and
1,530 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
3,038 changes: 1,698 additions & 1,340 deletions
3,038
Binaries/KSPDev_Utils.2.4.xml → Binaries/KSPDev_Utils.2.6-EVS.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# KSPDev: Kerbal Development tools - ReleaseBuilder | ||
|
||
Author: [email protected] | ||
|
||
GitHub: https://github.com/ihsoft/KSPDev/tree/master/Sources/ReleaseBuilder | ||
|
||
* * * | ||
|
||
## License | ||
|
||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# KSPDev: Kerbal Development tools - ReleaseBuilder | ||
|
||
`ReleaseBuilder` is flexible script that allows building mod releases for KSP quick and easy. | ||
Just define mod's structure and the script will manage everything else: from updating MinAVC | ||
version file to preparing final ZIP package. | ||
|
||
Read discussions, ask questions and suggest features on | ||
[forum](http://forum.kerbalspaceprogram.com/index.php?/topic/150786-12-kspdev-logconsole-utils). | ||
|
||
# Documentation | ||
|
||
See Wiki: https://github.com/ihsoft/KSPDev/wiki/ReleaseBuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Public domain license. | ||
# Author: [email protected] | ||
# 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. | ||
|
@@ -72,6 +72,7 @@ | |
import textwrap | ||
|
||
from clients import CurseForgeClient | ||
from utils import ChangelogUtils | ||
|
||
|
||
LOGGER = logging.getLogger() | ||
|
@@ -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'] | ||
|
@@ -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']: | ||
|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Public domain license. | ||
# Author: [email protected] | ||
# 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. | ||
|
@@ -11,7 +11,7 @@ | |
Example: | ||
$ PublishCurseForge.py\ | ||
$ PublishGitHub.py\ | ||
--user=my_github_user\ | ||
--repo=MyGitHubMod\ | ||
--token=1111111111122222222222222333333333333333\ | ||
|
@@ -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, | ||
|
@@ -67,6 +67,7 @@ | |
import textwrap | ||
|
||
from clients import GitHubClient | ||
from utils import ChangelogUtils | ||
|
||
|
||
LOGGER = logging.getLogger() | ||
|
@@ -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'] | ||
|
||
|
@@ -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: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Public domain license. | ||
# Author: [email protected] | ||
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder | ||
# $version: 1 | ||
# $date: 07/13/2018 | ||
# $version: 5 | ||
# $date: 10/28/2018 | ||
|
||
""" Script to publish releases to Spacedock. | ||
|
@@ -32,7 +32,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 | ||
$ 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, | ||
|
@@ -62,6 +62,7 @@ | |
import textwrap | ||
|
||
from clients import SpacedockClient | ||
from utils import ChangelogUtils | ||
|
||
|
||
LOGGER = logging.getLogger() | ||
|
@@ -90,7 +91,7 @@ def main(argv): | |
parser.add_argument( | ||
'--project', action='store', metavar='<project ID>', required=True, | ||
help='''the ID of the project to publish to. To get it, go to the mod | ||
overview on Spacedock and extarct the number from the URL: | ||
overview on Spacedock and extract the number from the URL: | ||
/mod/<project ID>/...''') | ||
parser.add_argument( | ||
'--changelog', action='store', metavar='<file path>', required=True, | ||
|
@@ -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'] | ||
|
@@ -149,7 +154,10 @@ 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['version_extract'], os.path.basename(filename)) | ||
|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
--project=245805 | ||
--token=<<SECRET>> | ||
--changelog=../CHANGELOG.md | ||
--github=ihsoft/EasyVesselSwitch | ||
--versions=latest_all_builds | ||
--title=EVS {tag} | ||
--archive=../EasyVesselSwitch_v2.1.zip | ||
--archive=../EasyVesselSwitch_v2.3.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--project=1906 | ||
--login=<<SECRET>> | ||
--changelog=../CHANGELOG.md | ||
--github=ihsoft/EasyVesselSwitch | ||
--ksp_version=latest | ||
--archive=../EasyVesselSwitch_v2.1.zip | ||
--archive=../EasyVesselSwitch_v2.3.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.