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

feat: cross-compilation #136

Merged
merged 1 commit into from
Jul 13, 2023
Merged

feat: cross-compilation #136

merged 1 commit into from
Jul 13, 2023

Conversation

jossef
Copy link
Member

@jossef jossef commented Jul 13, 2023

close #135

I submit this contribution under the Apache-2.0 license.

@github-actions
Copy link

kics-logo

KICS version: v1.7.0

Category Results
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 1
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 1
Metric Values
Files scanned placeholder 1
Files parsed placeholder 1
Files failed to scan placeholder 0
Total executed queries placeholder 49
Queries failed to execute placeholder 0
Execution time placeholder 1

@jossef jossef merged commit 8db9a41 into master Jul 13, 2023
@jossef jossef deleted the cross-compilation branch July 13, 2023 11:25
GOARCH: amd64
run: |
go build -ldflags "-s -w -X github.com/checkmarx/2ms/cmd.Version=$VERSION" -a -installsuffix cgo -o dist/2ms.exe main.go
zip -j dist/windows-amd64-$VERSION.zip dist/2ms.exe
Copy link
Contributor

@baruchiro baruchiro Jul 13, 2023

Choose a reason for hiding this comment

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

Why zip?

It will add more steps for CI (but for sure, if it is for saving bandwidth, I understand)

GOARCH: amd64
run: |
go build -ldflags "-s -w -X github.com/checkmarx/2ms/cmd.Version=$VERSION" -a -installsuffix cgo -o dist/2ms main.go
zip -j dist/macos-amd64-$VERSION.zip dist/2ms
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a problem with the name containing a version.

If you keep the name the same across versions, you can download the latest artifact with a link:
https://github.com/Checkmarx/2ms/releases/latest/download/2ms.

But now, we can't use a generic link, because the filename is always changing, and we need to first fetch the latest version name, then construct the filename to download.

Also, need to update the README now.

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

Successfully merging this pull request may close these issues.

add compiled binaries of major operating systems to release artifacts
2 participants