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

Migrate Makefile to Magefile #160

Merged
merged 5 commits into from
Aug 13, 2023
Merged

Migrate Makefile to Magefile #160

merged 5 commits into from
Aug 13, 2023

Conversation

rappizs
Copy link
Contributor

@rappizs rappizs commented Aug 10, 2023

Migrated make to mage

Fixes #61

@rappizs rappizs force-pushed the mage branch 2 times, most recently from 4f1ec19 to 1eac70b Compare August 10, 2023 13:05
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #160 (22aba54) into main (1e82998) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##            main    #160   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          1       1           
  Lines         67      67           
=====================================
  Misses        67      67           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rappizs rappizs force-pushed the mage branch 11 times, most recently from 706d939 to 9e9eb98 Compare August 11, 2023 09:30
@lgecse
Copy link
Contributor

lgecse commented Aug 11, 2023

LGTM! 🙌

rappizs and others added 2 commits August 12, 2023 18:50
Signed-off-by: Stephen Augustus <[email protected]>
Copy link
Contributor

@justaugustus justaugustus left a comment

Choose a reason for hiding this comment

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

Great improvement, @rappizs!

I've built on this PR a bit to integrate some patterns from some of the Kubernetes RelEng repos:

@justaugustus justaugustus merged commit 5422215 into uwu-tools:main Aug 13, 2023
9 checks passed
Copy link
Contributor Author

@rappizs rappizs left a comment

Choose a reason for hiding this comment

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

Thanks for the refactoring @justaugustus!

I found some minor issues with the final code, could you please take a look at them? Should we create an issue for it or is it ok if I just create a PR for fixing them?

coverProfileFilename = "unit-coverage.out"
)

// All runs all targets for this repository
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The description is a little bit misleading, since we only run two targets not all of them

}

// getBuildDateTime gets the build date and time
func getBuildDateTime() string {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This func is not used anywhere

}

// getGitState gets the state of the git repository
func getGitState() string {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This func is not used anywhere

OS="${PLATFORM%/*}"
ARCH=$(basename "$PLATFORM")

output_name=bom'-'$OS'-'$ARCH
Copy link
Contributor Author

@rappizs rappizs Aug 14, 2023

Choose a reason for hiding this comment

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

I believe bom is just a copy mistake from https://github.com/kubernetes-sigs/bom/blob/main/scripts/verify-build.sh, this should be gh-jira-issue-sync or something like that.

}

// Build runs go build
func Build() error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Build doesn't work on OSX, created an issue for it: #166

fi

echo "Building project for $PLATFORM"
CGO_ENABLED=0 GOARCH="$ARCH" GOOS="$OS" go build -trimpath -ldflags "${GHJIRA_LDFLAGS}" -o output/$output_name ./main.go
Copy link
Contributor Author

@rappizs rappizs Aug 14, 2023

Choose a reason for hiding this comment

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

The output dir is not included in the .gitignore file: #167

matewolf pushed a commit to matewolf/gh-jira-issue-sync that referenced this pull request Aug 28, 2023
* feat(mage): Replace make with
* magefile: Adopt patterns from Kubernetes Release Engineering repos

---------

Signed-off-by: Zsolt Rappi <[email protected]>
Co-authored-by: Stephen Augustus <[email protected]>
Signed-off-by: matewolf <[email protected]>
matewolf pushed a commit to matewolf/gh-jira-issue-sync that referenced this pull request Aug 28, 2023
* feat(mage): Replace make with
* magefile: Adopt patterns from Kubernetes Release Engineering repos

---------

Signed-off-by: Zsolt Rappi <[email protected]>
Co-authored-by: Stephen Augustus <[email protected]>
Signed-off-by: matewolf <[email protected]>
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.

Replace make with mage
3 participants