Skip to content

Commit

Permalink
more asset folder cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mredolatti committed Jan 25, 2024
1 parent ec42bee commit 27e4829
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ coverage.out: test_coverage

# because of windows .exe suffix, we need a macro on the right side, which needs to be executed
# after the `%` evaluation, therefore, in a second expansion

.SECONDEXPANSION:
%.zip: $$(call mkexec,%)
$(ZIP) -9 --junk-paths $@ $<
Expand Down Expand Up @@ -194,8 +193,9 @@ ifeq ($(CURRENT_OS),Darwin) # we're on macos, we need to build using a dockerize
$(addprefix $(BUILD_FIPS)/,$(windows_execs)): $(BUILD_FIPS)/split_%: $(sources) go.sum
mkdir -p $(BUILD_FIPS)
bash -c 'pushd windows && ./build_from_mac.sh'
cp $(BUILD_FIPS_WIN_TMP)/split-sync-fips.exe $(BUILD_FIPS)/split_sync_windows.exe
cp $(BUILD_FIPS_WIN_TMP)/split-proxy-fips.exe $(BUILD_FIPS)/split_proxy_windows.exe
cp $(BUILD_FIPS_WIN_TMP)/$(shell basename $@) $(BUILD_FIPS)
#cp $(BUILD_FIPS_WIN_TMP)/split_sync_windows.exe $(BUILD_FIPS)
#cp $(BUILD_FIPS_WIN_TMP)/split_proxy_windows.exe $(BUILD_FIPS)
else
$(addprefix $(BUILD_FIPS)/,$(windows_execs)): $(BUILD_FIPS)/split_%: $(sources) go.sum
mkdir -p $(BUILD_FIPS) # we're on linux, we can build natively
Expand Down
2 changes: 1 addition & 1 deletion splitio/commitversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ This file is created automatically, please do not edit
*/

// CommitVersion is the version of the last commit previous to release
const CommitVersion = "d5dc3d0"
const CommitVersion = "ec42bee"
13 changes: 8 additions & 5 deletions windows/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ SOURCES := $(shell find $(PARENT_PATH) -path $(dirname $(pwd))/windows -prune -o
$(PARENT_PATH)/go.mod \
$(PARENT_PATH)/go.sum

SYNC_BIN := split_sync_windows.exe
PROXY_BIN := split_proxy_windows.exe

.PHONY: clean setup_ms_go

default: help
Expand All @@ -24,27 +27,27 @@ clean:
setup_ms_go: $(UNPACK_FOLDER)/go

## build fips-compliant split-proxy && split-sync
binaries: $(BUILD_FOLDER)/split-proxy-fips.exe $(BUILD_FOLDER)/split-sync-fips.exe
binaries: $(BUILD_FOLDER)/$(SYNC_BIN) $(BUILD_FOLDER)/$(PROXY_BIN)


# --------


$(DOWNLOAD_FOLDER)/go1.21.linux-amd64.tar.gz:
$(DOWNLOAD_FOLDER)/$(ASSET):
mkdir -p $(DOWNLOAD_FOLDER)
wget https://aka.ms/golang/release/latest/$(ASSET) --directory-prefix $(DOWNLOAD_FOLDER)
# wget https://aka.ms/golang/release/latest/$(ASSET).sha256 --directory-prefix $(DOWNLOAD_FOLDER)
# TODO(mredolatti): validate SUM
# TODO(mredolatti): validate sha256

$(UNPACK_FOLDER)/go: $(DOWNLOAD_FOLDER)/$(ASSET)
mkdir -p $(UNPACK_FOLDER)
tar xvzf $(DOWNLOAD_FOLDER)/$(ASSET) --directory $(UNPACK_FOLDER)

$(BUILD_FOLDER)/split-proxy-fips.exe: $(GO) $(SOURCES)
$(BUILD_FOLDER)/$(PROXY_BIN): $(GO) $(SOURCES)
mkdir -p $(BUILD_FOLDER)
GOOS=windows GOEXPERIMENT=cngcrypto $(GO) build -tags=enforce_fips -o $@ $(PARENT_PATH)/cmd/proxy/main.go

$(BUILD_FOLDER)/split-sync-fips.exe: $(GO) $(SOURCES)
$(BUILD_FOLDER)/$(SYNC_BIN): $(GO) $(SOURCES)
mkdir -p $(BUILD_FOLDER)
GOOS=windows GOEXPERIMENT=cngcrypto $(GO) build -tags=enforce_fips -o $@ $(PARENT_PATH)/cmd/synchronizer/main.go

Expand Down

0 comments on commit 27e4829

Please sign in to comment.