Skip to content
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

Fix the "datasette now publish ... --alias=x" option #459

Closed
simonw opened this issue May 11, 2019 · 3 comments
Closed

Fix the "datasette now publish ... --alias=x" option #459

simonw opened this issue May 11, 2019 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented May 11, 2019

Now have deprecated the mechanism we were using for this - running now alias without any parameters - in favour of something new:

https://zeit.co/blog/automatic-aliasing

@simonw
Copy link
Owner Author

simonw commented May 11, 2019

I also need to fix my various .travis.yml configs to adapt to this new change.

@simonw
Copy link
Owner Author

simonw commented May 11, 2019

This is the publish code that needs updating:

now_json = {"version": 1}
if alias:
now_json["alias"] = alias
open("now.json", "w").write(json.dumps(now_json))
args = []
if force:
args.append("--force")
if token:
args.append("--token={}".format(token))
if args:
call(["now"] + args)
else:
call("now")
if alias:
alias_args = ["alias"]
if token:
alias_args.append("--token={}".format(token))
call(["now"] + alias_args)

@simonw simonw added this to the 0.28 milestone May 11, 2019
@simonw
Copy link
Owner Author

simonw commented May 11, 2019

This needs doing before the next release because it is interfering with my Travis code that actually runs the release: https://travis-ci.org/simonw/datasette/jobs/530597261

@simonw simonw closed this as completed in 09ef305 May 11, 2019
simonw added a commit that referenced this issue May 11, 2019
simonw added a commit that referenced this issue May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant