Closed ortex closed 1 year ago
Suggestions:
I think it would be convenient to allow leading "v" in argument, so that 1.2.3 and v1.2.3 would be equivalent. I guess we will often forget whether "v" is needed or not :)
There is a convenient way to replace text in file using fileinput module https://stackoverflow.com/a/20593644/3169754
I'd relax search pattern for "bindingsVersion". Don't assume "var" (it may be on another line or be "const"), instead search for bindingsVersion = "..." with arbitrary number of spaces around "=".
Let's log to console all command we run and actions like modifying file.
Let's print errors to stderr instead of stdout.
Let's use exit(1) when exiting with error.
Ideally we also need "-f" option that will forcibly override tag both locally and remotely. We can add it in this pr or create a separate issue.
It also would be convenient to automatically change directory to project root at start, to allow invocation from any directory. I think we can assume that the script is in project root and chdir to script's dir.
fixed everything except "-f" option
LGTM!
106
result: https://github.com/ortex/roc-go/commit/51d8c36e136d193ccb4310517af2352acc2182de