Skip to content

Use goreleaser to cross-compile and release - #31

Merged
Nuru (Nuru) merged 2 commits into
masterfrom
cross-compile
Apr 23, 2021
Merged

Nuru (Nuru) merged 2 commits into
masterfrom
cross-compile

Conversation

@Nuru

@Nuru Nuru (Nuru) commented Apr 20, 2021 •

Copy link
Copy Markdown
Contributor

what

why

  • Make binaries available for other platforms

notes

  • At this time, Windows builds fail due to syscall in k-kinzal/[email protected] being undefined, so we are not yet distributing Windows binaries

references

@Nuru Nuru (Nuru) added the patch A minor, backward compatible change label Apr 20, 2021
@Nuru
Nuru (Nuru) requested review from a team as code owners April 20, 2021 19:27
Comment thread atmos/main.variant Outdated
"./modules/workflow",
"./modules/istio",
"./modules/vendor"
"./modules/vendor-command"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we move vendor to vendor-command (I don't recollect that) ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nuru (@Nuru) told me it's because:

The build copies the entire source folder into the binary, so the source folder should be as small as possible.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, this is different though. I don't know why we're doing that here. Then we should have helm-command, terraform-command, etc. I'd rather not change this. Or if we must, call it vendir

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Andriy Knysh (@aknysh) Erik Osterman (Cloud Posse) (@osterman) The folder name vendor is reserved by Go for local copies of external dependencies. It causes a world of hurt to have a folder named vendor in any project that includes Go code. (It has even caused problems in cloudposse/packages)

I thought it better to rename it vendor-command but I have no problem with calling it vendir if you prefer. LMK.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's call it vendir. That is more accurate anyways

Comment thread .goreleaser.yml Resolved
Comment thread example/cli/main.variant
Comment on lines +53 to +61
"git::https://[email protected]/cloudposse/atmos@atmos/modules/utils?ref=master",
"git::https://[email protected]/cloudposse/atmos@atmos/modules/shell?ref=master",
"git::https://[email protected]/cloudposse/atmos@atmos/modules/kubeconfig?ref=master",
"git::https://[email protected]/cloudposse/atmos@atmos/modules/terraform?ref=master",
"git::https://[email protected]/cloudposse/atmos@atmos/modules/helmfile?ref=master",
"git::https://[email protected]/cloudposse/atmos@atmos/modules/helm?ref=master",
"git::https://[email protected]/cloudposse/atmos@atmos/modules/workflow?ref=master",
"git::https://[email protected]/cloudposse/atmos@atmos/modules/istio?ref=master",
"git::https://[email protected]/cloudposse/atmos@atmos/modules/vendor?ref=master"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nuru (@Nuru) said this change was made because:

The build copies the entire source folder into the binary, so the source folder should be as small as possible.

But why does atmos/ not get included, but modules/ get included?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

atmos gets included. The issue before was that main.variant was at the top level, so everything in the repo was being included in the build. Now main.variant is in atmos/, which only includes the Variant code.

@Nuru
Nuru (Nuru) merged commit a5fd6ea into master Apr 23, 2021
@Nuru
Nuru (Nuru) deleted the cross-compile branch April 23, 2021 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch A minor, backward compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants