-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
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,42 @@ | ||
""" | ||
""" | ||
from cldfbench.cli_util import add_dataset_spec, get_dataset | ||
|
||
|
||
def register(parser): | ||
add_dataset_spec(parser) | ||
parser.add_argument('tag') | ||
|
||
|
||
def run(args): # pragma: no cover | ||
tag = args.tag | ||
if not tag.startswith('v'): | ||
tag = 'v' + tag | ||
ds = get_dataset(args) | ||
cldf = ds.cldf_reader() | ||
if cldf.properties.get('dc:bibliographicCitation'): | ||
relnotes = """\ | ||
Cite the source as | ||
> {} | ||
and the D-PLACE dataset as | ||
DOI""".format(cldf.properties['dc:bibliographicCitation']) | ||
else: | ||
relnotes = """\ | ||
Cite the D-PLACE dataset as | ||
DOI""" | ||
|
||
ds.dir.joinpath('relnotes.txt').write_text(relnotes, encoding='utf8') | ||
print('gh release create {} --title "{}" --notes-file relnotes.txt'.format( | ||
tag, cldf.properties['dc:title'])) | ||
print('git pull origin') | ||
print('') | ||
print("Now you should grab the Zenodo version DOI from\n" | ||
"https://zenodo.org/account/settings/github/repository/D-PLACE/{0}\n" | ||
"and add it to\n" | ||
"https://github.com/D-PLACE/{0}/releases/edit/{1}\n and the concept DOI to " | ||
"metdata.json".format(cldf.properties['rdf:ID'], tag)) |
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