Skip to content

Commit

Permalink
Merge pull request #149 from martinholmer/0-17-0
Browse files Browse the repository at this point in the history
Add 'anaconda upload' command print statement
  • Loading branch information
martinholmer authored Dec 17, 2018
2 parents 7e08c7f + 4147955 commit 7191c29
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ this command and getting something like this screen output:

```
$ pbrelease --version
Package-Builder 0.16.0
Package-Builder 0.17.0
```

Then see the information that `pbrelease` expects by asking for help
Expand Down
17 changes: 17 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ Go [here](https://github.com/PSLmodels~/Package-Builder/pulls?q=is%3Apr+is%3Aclo
for a complete commit history.


2018-12-17 Release 0.17.0
-------------------------
(last merged pull request is
[#149](https://github.com/PSLmodels/Package-Builder/pull/149))

**API Changes**
- None

**New Features**
- Add `anaconda upload` command print statement
[[#149](https://github.com/PSLmodels/Package-Builder/pull/149)
by Martin Holmer based on suggestion from Hank Doupe]

**Bug Fixes**
- None


2018-12-16 Release 0.16.0
-------------------------
(last merged pull request is
Expand Down
8 changes: 4 additions & 4 deletions pkgbld/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ def release(repo_name, pkg_name, version, also37=True, dryrun=False):
msg = 'version={} does not have X.Y.Z semantic-versioning pattern'
raise ValueError(msg.format(version))

# get token
# check for token file
if not os.path.isfile(ANACONDA_TOKEN_FILE):
msg = 'Anaconda token file {} does not exist'
raise ValueError(msg.format(ANACONDA_TOKEN_FILE))
with open(ANACONDA_TOKEN_FILE, 'r') as tfile:
token = tfile.read()

# specify Python versions
if also37:
Expand All @@ -106,6 +104,7 @@ def release(repo_name, pkg_name, version, also37=True, dryrun=False):
print(': python_versions = {}'.format(python_versions))
print(': Package-Builder will upload model packages to:')
print(': Anaconda channel = {}'.format(ANACONDA_CHANNEL))
print(': using token in file = {}'.format(ANACONDA_TOKEN_FILE))
if dryrun:
print(': Package-Builder is quitting')
return
Expand Down Expand Up @@ -177,8 +176,9 @@ def release(repo_name, pkg_name, version, also37=True, dryrun=False):
for platform in OS_PLATFORMS:
pkgpath = os.path.join(BUILDS_DIR, platform, pkgfile)
cmd = 'anaconda -t {} upload -u {} --force {}'.format(
token, ANACONDA_USER, pkgpath
ANACONDA_TOKEN_FILE, ANACONDA_USER, pkgpath
)
print('upload cmd is <{}>'.format(cmd))
u.os_call(cmd)

print(': Package-Builder is cleaning-up')
Expand Down

0 comments on commit 7191c29

Please sign in to comment.