-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script to release ok-client #288
Conversation
This reverts commit cdb9082.
It works https://github.com/okpy/ok-client/releases/tag/v1.10.3 Feel free to try it out there. You'll need to have the server running locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tried it but it looks good. I'll try it out soon
contains okpy's Pypi credentials. | ||
3. From the base of the repo, make sure your virtualenv is activated and run | ||
* Your virtualenv is activated and you are on the master branch. | ||
* Your `~/.pypirc` contains okpy's PyPI credentials. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is supposed to be a checklist - something about double checking that tests have passed would probably be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests only take a few seconds, so I'll just add that to the script's sanity checks.
README.md
Outdated
3. From the base of the repo, make sure your virtualenv is activated and run | ||
* Your virtualenv is activated and you are on the master branch. | ||
* Your `~/.pypirc` contains okpy's PyPI credentials. | ||
* A file `.github-token` contains a [GitHub access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What scopes/permissions does the token need? (It's fine to just say select all of them)
) | ||
|
||
print('Updating version on {}...'.format(OK_SERVER_URL)) | ||
# Create a fake assignment to log in. I'm not happy about this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of scope for this PR: Getting a token seems like the one thing we should be able to support without an assignment. Maybe we should add a method somewhere that accepts all of the default values.
I've opened up a URL in other scripts - but I don't recommend it for this file.
def get_token():
print("Get an access token for your OK account & paste it below")
webbrowser.open('https://ok-oauth.app.cs61a.org/')
return input("Your OK Token: ").strip()
release.py
Outdated
try: | ||
output = subprocess.run(command, **kwargs) | ||
except subprocess.CalledProcessError as e: | ||
print(str(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious: Any reason this isn't going into sys.stderr? (I'm ambivalent about where it goes)
Being able to use
I actually haven't been able to get the script smoothly because of the python issues (and the virtualenv issues). I did get to upload a release though.
|
Also I think there's a dependence on running From the diff it seems like that part hasn't been added? |
This does use the virtualenv python3. I don't want to hardcode |
Sure. |
I think I've addressed everything. Any other concerns before I merge? |
Nope - feel free to merge & then release with this script :) |
Resolves #264, #276.
Test plan:
python setup.py sdist upload
GITHUB_REPO
to point to the testing repoOK_SERVER_URL
to point tolocalhost:5000