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

1build support for windows os #176

Open
gopinath-langote opened this issue Oct 13, 2019 · 12 comments
Open

1build support for windows os #176

gopinath-langote opened this issue Oct 13, 2019 · 12 comments
Labels
good first issue Good for first time contributors Hacktoberfest Support to https://hacktoberfest.digitalocean.com/ help wanted Extra attention is needed new_feature New features up for grab
Milestone

Comments

@gopinath-langote
Copy link
Owner

Description

  • Support 1build for Windows - Os

Acceptance Criteria

  • Able to use all functionality of 1build on Windows OS
  • Run tests on Windows platform (on CI/CD Travis CI or GitHub Actions)
@gopinath-langote gopinath-langote added good first issue Good for first time contributors Hacktoberfest Support to https://hacktoberfest.digitalocean.com/ help wanted Extra attention is needed new_feature New features labels Oct 13, 2019
@gopinath-langote gopinath-langote added this to To do in Feature Ideas / Bug tracker via automation Oct 13, 2019
@gopinath-langote gopinath-langote added this to the v1.5.0 milestone Oct 13, 2019
@gopinath-langote gopinath-langote pinned this issue Oct 13, 2019
@diptag
Copy link
Contributor

diptag commented Oct 19, 2019

I would like to take this up.

@gopinath-langote
Copy link
Owner Author

@diptag sure. go for it.

@gopinath-langote gopinath-langote added In Progress Someone working on the issue and removed help wanted Extra attention is needed labels Oct 19, 2019
@diptag
Copy link
Contributor

diptag commented Oct 19, 2019

In many places path are being joined using path1 + "/" + path2. Instead path/filepath package's filepath.Join(path1, path2) function can be used.

@diptag
Copy link
Contributor

diptag commented Oct 20, 2019

The logrusorgru/aurora package is not supported on Windows as it uses ANSI colors. What do you suggest?

@gopinath-langote
Copy link
Owner Author

gopinath-langote commented Oct 20, 2019

In many places path are being joined using path1 + "/" + path2. Instead path/filepath package's filepath.Join(path1, path2) function can be used.

Sure. Make sense. Please refactor the code whenever you touch the files

The logrusorgru/aurora package is not supported on Windows as it uses ANSI colors. What do you suggest?

We can use https://github.com/fatih/color - it is an archived project but still easy to do it.

GitHub
Color package for Go (golang). Contribute to fatih/color development by creating an account on GitHub.

@diptag
Copy link
Contributor

diptag commented Oct 20, 2019

fatih/color doesn't support windows by itself, we will have to use mattn/go-colorable for that. We can use it with logrusorgru/aurora too. And mattn/go-colorable does not support underlined or bold text.

@gopinath-langote
Copy link
Owner Author

gopinath-langote commented Oct 21, 2019

AFAIK, fatih/color has support for windows https://github.com/fatih/color/blob/master/README.md#color--

GitHub
Color package for Go (golang). Contribute to fatih/color development by creating an account on GitHub.

@diptag
Copy link
Contributor

diptag commented Oct 21, 2019

Yeah, it supports Windows, my bad. But it only works when we use the color library to print directly to console, not when we use it to pass a colored string to another fmt's print statement. So it will require to change every print statement which is using colored text. And what about support for underlined and bold text?

@gopinath-langote
Copy link
Owner Author

gopinath-langote commented Oct 22, 2019

what about support for underlined and bold text?

Does fatih/color has support for Underline and Bold for all OS?

But it only works when we use the color library to print directly to consol

In general, I wanted to refactor the code and make all color printing to utility - where you can just specify the style example,

printerUtils.print(text, list<styles>)

successStyle = Style{
color = CYAN,
BOLD = true,
Underline = false
}
printerUtils.print("SUCCESS", successStyle)

With such structure - you will be able to change the library easily in future

@gopinath-langote
Copy link
Owner Author

I have made the change in the code.

Now - We don't need to get colored string to concat with other string.

The current implementation uses - printer.go to print color with passed style.

It will be easy to switch the color lib in the future.

@gopinath-langote gopinath-langote unpinned this issue Jan 29, 2020
@al-sabr
Copy link

al-sabr commented Mar 30, 2020

How far is this implemented at this moment?

@gopinath-langote gopinath-langote added help wanted Extra attention is needed and removed In Progress Someone working on the issue labels Mar 30, 2020
@gopinath-langote
Copy link
Owner Author

@gdeverlant Up for grab now.

@gopinath-langote gopinath-langote modified the milestones: v1.5.0, v1.6.0 Apr 1, 2020
@gopinath-langote gopinath-langote modified the milestones: v1.6.0, v1.7.0 Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for first time contributors Hacktoberfest Support to https://hacktoberfest.digitalocean.com/ help wanted Extra attention is needed new_feature New features up for grab
Projects
Development

No branches or pull requests

3 participants