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

Align files #116

Merged
merged 1 commit into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@4.3.0
# devctl@4.4.0
#
version: 2
updates:
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/zz_generated.create_release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@4.3.0
# devctl@4.4.0
#
name: Create Release
on:
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
uses: giantswarm/[email protected]
with:
binary: "architect"
version: "3.0.5"
version: "3.4.0"
- name: Install semver
uses: giantswarm/[email protected]
with:
Expand Down Expand Up @@ -239,11 +239,13 @@ jobs:
strategy:
matrix:
platform:
- darwin
- linux
- darwin-amd64
- linux-amd64
- darwin-arm64
- linux-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO_VERSION: 1.14.2
GO_VERSION: 1.16.2
ARTIFACT_DIR: bin-dist
TAG: v${{ needs.gather_facts.outputs.version }}
needs:
Expand All @@ -254,7 +256,7 @@ jobs:
uses: giantswarm/[email protected]
with:
binary: "architect"
version: "3.0.5"
version: "3.4.0"
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/[email protected]
with:
Expand All @@ -268,7 +270,7 @@ jobs:
- name: Add ${{ matrix.platform }} package to release
uses: actions/upload-release-asset@v1
env:
FILE_NAME: ${{ github.event.repository.name }}-${{ env.TAG }}-${{ matrix.platform }}-amd64.tar.gz
FILE_NAME: ${{ github.event.repository.name }}-${{ env.TAG }}-${{ matrix.platform }}.tar.gz
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ${{ env.ARTIFACT_DIR }}/${{ env.FILE_NAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/zz_generated.create_release_pr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@4.3.0
# devctl@4.4.0
#
name: Create Release PR
on:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
uses: giantswarm/[email protected]
with:
binary: "architect"
version: "3.0.5"
version: "3.4.0"
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare release changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zz_generated.gitleaks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@4.3.0
# devctl@4.4.0
#
name: gitleaks

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@4.3.0
# devctl@4.4.0
#

include Makefile.*.mk
Expand Down
48 changes: 41 additions & 7 deletions Makefile.gen.go.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT. Generated with:
#
# devctl@4.3.0
# devctl@4.4.0
#

PACKAGE_DIR := ./bin-dist
Expand All @@ -21,16 +21,22 @@ LDFLAGS ?= -w -linkmode 'auto' -extldflags '$(EXTLDFLAGS)' \

.DEFAULT_GOAL := build

.PHONY: build build-darwin build-linux
.PHONY: build build-darwin build-darwin-64 build-linux build-linux-arm64
## build: builds a local binary
build: $(APPLICATION)
@echo "====> $@"
## build-darwin: builds a local binary for darwin/amd64
build-darwin: $(APPLICATION)-darwin
@echo "====> $@"
## build-darwin-arm64: builds a local binary for darwin/arm64
build-darwin-arm64: $(APPLICATION)-darwin-arm64
@echo "====> $@"
## build-linux: builds a local binary for linux/amd64
build-linux: $(APPLICATION)-linux
@echo "====> $@"
## build-linux-arm64: builds a local binary for linux/arm64
build-linux-arm64: $(APPLICATION)-linux-arm64
@echo "====> $@"

$(APPLICATION): $(APPLICATION)-v$(VERSION)-$(OS)-amd64
@echo "====> $@"
Expand All @@ -40,20 +46,38 @@ $(APPLICATION)-darwin: $(APPLICATION)-v$(VERSION)-darwin-amd64
@echo "====> $@"
cp -a $< $@

$(APPLICATION)-darwin-arm64: $(APPLICATION)-v$(VERSION)-darwin-arm64
@echo "====> $@"
cp -a $< $@

$(APPLICATION)-linux: $(APPLICATION)-v$(VERSION)-linux-amd64
@echo "====> $@"
cp -a $< $@

$(APPLICATION)-linux-arm64: $(APPLICATION)-v$(VERSION)-linux-arm64
@echo "====> $@"
cp -a $< $@

$(APPLICATION)-v$(VERSION)-%-amd64: $(SOURCES)
@echo "====> $@"
CGO_ENABLED=0 GOOS=$* GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $@ .

.PHONY: package-darwin package-linux
## package-darwin: prepares a packaged darwin/amd64 version
package-darwin: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-darwin-amd64.tar.gz
$(APPLICATION)-v$(VERSION)-%-arm64: $(SOURCES)
@echo "====> $@"
CGO_ENABLED=0 GOOS=$* GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o $@ .

.PHONY: package-darwin-amd64 package-darwin-arm64 package-linux-amd64 package-linux-arm64
## package-darwin-amd64: prepares a packaged darwin/amd64 version
package-darwin-amd64: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-darwin-amd64.tar.gz
@echo "====> $@"
## package-linux: prepares a packaged linux/amd64 version
package-linux: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-linux-amd64.tar.gz
## package-darwin-arm64: prepares a packaged darwin/arm64 version
package-darwin-arm64: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-darwin-arm64.tar.gz
@echo "====> $@"
## package-linux-amd64: prepares a packaged linux/amd64 version
package-linux-amd64: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-linux-amd64.tar.gz
@echo "====> $@"
## package-linux-arm64: prepares a packaged linux/arm64 version
package-linux-arm64: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-linux-arm64.tar.gz
@echo "====> $@"

$(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-%-amd64.tar.gz: DIR=$(PACKAGE_DIR)/$<
Expand All @@ -66,6 +90,16 @@ $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-%-amd64.tar.gz: $(APPLICATION)-v$(VERS
rm -rf $(DIR)
rm -rf $<

$(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-%-arm64.tar.gz: DIR=$(PACKAGE_DIR)/$<
$(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-%-arm64.tar.gz: $(APPLICATION)-v$(VERSION)-%-arm64
@echo "====> $@"
mkdir -p $(DIR)
cp $< $(DIR)/$(APPLICATION)
cp README.md LICENSE $(DIR)
tar -C $(PACKAGE_DIR) -cvzf $(PACKAGE_DIR)/$<.tar.gz $<
rm -rf $(DIR)
rm -rf $<

.PHONY: install
## install: install the application
install:
Expand Down