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

Output contains invisible non-space trailing characters #83

Closed
leesah opened this issue Nov 24, 2017 · 2 comments
Closed

Output contains invisible non-space trailing characters #83

leesah opened this issue Nov 24, 2017 · 2 comments

Comments

@leesah
Copy link

leesah commented Nov 24, 2017

I am trying to write a script to automatically step the version of a certain dependency, the first step of which is to extract the latest version of it with sbt-updates:

$ sbt -batch dependencyUpdates | awk -F'\\s+->\\s+' '/com.example:example-artifact/ {print $NF}'
1.3

Which looks fine until I try to trim the trailing whitespaces:

$ sbt -batch dependencyUpdates | awk -F'\\s+->\\s+' '/com.example:example-artifact/ {print $NF}' | sed 's/[^0-9]*$/x/g'
1.3               ^[[2;1;1;112;112;1;0x

This is quite unfriendly when scripting. Could there be a cleaner output?

@rtimush
Copy link
Owner

rtimush commented Nov 24, 2017

Hi.
Have you considered depencencyUpdatesReport task? It writes the report to a text file and I think there should be no special characters.
Another option is to write your automation as an SBT task and get the updates data from dependencyUpdatesData

@leesah
Copy link
Author

leesah commented Nov 28, 2017

Then this can be discussed in #84, I guess. I'm closing this issue.

@leesah leesah closed this as completed Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants