#variant (2019-04)

https://github.com/mumoshu/variant

Discuss variant (the “Universal CLI”) https://github.com/mumoshu/variant

Archive: https://archive.sweetops.com/variant/

2019-04-30

tolstikov avatar
tolstikov
feat: Allow log level to be customized · Issue #76 · mumoshu/variant

WHAT: Allow log level to be customized through the environment variable, e.g.: VARIANT_LOG_LEVEL="warn" WHY: We want to allow to set the custom log level for "variant". For exam…

2019-04-25

tolstikov avatar
tolstikov

@mumoshu hey, please check: https://github.com/mumoshu/variant/pull/74

Add custom log colors by aroq · Pull Request #74 · mumoshu/variant

WHAT: Add custom colors for log messages. WHY: For some cases, we want to allow to set custom colors for every type of log messages (panic, fatal, error, warn, info, debug, trace). For example, man…

mumoshu avatar
mumoshu

thx for the pr! will take a look asap

Add custom log colors by aroq · Pull Request #74 · mumoshu/variant

WHAT: Add custom colors for log messages. WHY: For some cases, we want to allow to set custom colors for every type of log messages (panic, fatal, error, warn, info, debug, trace). For example, man…

:--1:1

2019-04-19

tolstikov avatar
tolstikov
feature request: Allow execute task with not default param inside script section · Issue #73 · mumoshu/variant

Hello, Your tool is great but I faced with some problem. I don't know may be it already supported but I didn't find examples how to do it. Let's me explain. You have next example of usa…

mumoshu avatar
mumoshu

@tolstikov Thx for chiming in! Replied.

:--1:1

2019-04-17

tolstikov avatar
tolstikov

@mumoshu do you want a motto for variant?

“One glue to glue them all”

mumoshu avatar
mumoshu

Love it!

:--1:1

2019-04-03

mumoshu avatar
mumoshu

thx for sharing

2019-04-02

oscarsullivan_old avatar
oscarsullivan_old

How do I ensure the latest version of Variant is on my module?

oscarsullivan_old avatar
oscarsullivan_old

Also is this expected?

✅   (healthera-sandbox-iac) pod ➤ variant version -v
loading config file variant.yaml...missing
loading env file .varenv...missing
version
oscarsullivan_old avatar
oscarsullivan_old

tried with and without the verbose flag

oscarsullivan_old avatar
oscarsullivan_old

On 0.27.1 in ubuntu CLI:

[email protected]:~$ variant version
version
mumoshu avatar
mumoshu

@oscarsullivan_old good catch! something seems wrong with the version command. It should print v0.27.1 at least

mumoshu avatar
mumoshu


How do I ensure the latest version of Variant is on my module?

there’s no way currently. i was thinking that you’ll prefer wrapping the whole variant command up into a docker image, so that you can tie a specific version of variant and your variant command

but that’s not always the case?

mumoshu avatar
mumoshu

i wonder if it helps to add variantVersion that is written in your variant command like:

variantVersion: 0.27.0

so that running ./yourcmd on a machine with an older or newer version of variant immediately fails

wdyt?

oscarsullivan_old avatar
oscarsullivan_old

Are you saying every command that is run has a version output?

oscarsullivan_old avatar
oscarsullivan_old

Sounds like two ideas there.

oscarsullivan_old avatar
oscarsullivan_old

How would you get the latest version for idea 2 to compare against?

mumoshu avatar
mumoshu


Are you saying every command that is run has a version output?

no

mumoshu avatar
mumoshu


How would you get the latest version for idea 2 to compare against?

Not sure I’m following you correctly, but I’d fix variant to properly embed its own version(like 0.27.0). So that when your variant command gets loaded by the variant(as the runtime), variant can see what version of runtime is required by the command wants, and validate if its own version matches the required version

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@mumoshu you are correct that in our case we can just check what version of the apk is installed

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

though if variant is installed natively without a package manager, there’s really no way to know what version is installed

mumoshu avatar
mumoshu

yes, i have no good idea how we force embed the version number when it is installed natively with go get

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

oh yea, not with go get

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

(though I have never understood why go get is so popular when you cannot even select what eversion you go get)

mumoshu avatar
mumoshu

ah ok

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

it’s like you go get some random version that happens to be at master at the particular instant

mumoshu avatar
mumoshu

i’ve fixed variant version to properly show the version number for releases

$ ./variant version
0.27.2
Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

:100:

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
Golang application auto build versioning

Is it possible to increment a minor version number automatically each time a Go app is compiled? I would like to set a version number inside my program, with an autoincrementing section: $ myapp -

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)


yes, i have no good idea how we force embed the version number when it is installed natively with go get

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

one thing I’ve seen (and considered implementing at cloudposse) is adding a sentinel file for the version that is committed in the repo

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

that way even releases are peer reviewed

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

and then have the CI system apply the release tag from the sentinel file on merge to master

loren avatar
loren

this is what we do, with bumpversion

oscarsullivan_old avatar
oscarsullivan_old

I thought you can do go get [email protected]

oscarsullivan_old avatar
oscarsullivan_old

Oh wait that’s go_install

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

yea, there are some 3rd party tools that will do it

oscarsullivan_old avatar
oscarsullivan_old

I might sound a bit uncertain because I use Ansible to install go packages

oscarsullivan_old avatar
oscarsullivan_old
fubarhouse/ansible-role-golang

Installs the Go programming language and packages on Mac & Linux (Ubuntu, CentOS) - fubarhouse/ansible-role-golang

oscarsullivan_old avatar
oscarsullivan_old

Can share playbook and examples if Ansible is a path you would be interested in for managing them

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

might be interesting for #ansible ?

loren avatar
loren
gopkg.in - Stable APIs for the Go language

Stable APIs for the Go language

loren avatar
loren

but i think it only pins to major version, which was a major bummer when i looked at it last

:--1:1

2019-04-01

mumoshu avatar
mumoshu

fixed in the latest release

oscarsullivan_old avatar
oscarsullivan_old

    keyboard_arrow_up