Skip to content

Commit 41576f7

Browse files
committed
Fixes after testing
Signed-off-by: Stavros Foteinopoulos <stafot@gmail.com>
1 parent 3fc69d9 commit 41576f7

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

Makefile

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,18 @@ bundle-fips:
218218
./build/bin/manifest dist-fips
219219
$(call copy_bundle_files,dist-fips)
220220
ifneq ($(HAS_SERVER),)
221-
mkdir -p dist-fips/$(PLUGIN_ID)/server
222-
cp -r server/dist-fips dist-fips/$(PLUGIN_ID)/server/dist
221+
mkdir -p dist-fips/$(PLUGIN_ID)/server/dist
222+
# Copy FIPS binaries but rename them to standard names for server compatibility
223+
if [ -f server/dist-fips/plugin-linux-amd64-fips ]; then \
224+
cp server/dist-fips/plugin-linux-amd64-fips dist-fips/$(PLUGIN_ID)/server/dist/plugin-linux-amd64; \
225+
fi
226+
# Copy any other FIPS binaries and rename them
227+
for file in server/dist-fips/plugin-*-fips*; do \
228+
if [ -f "$$file" ]; then \
229+
target=$$(basename "$$file" | sed 's/-fips//g'); \
230+
cp "$$file" "dist-fips/$(PLUGIN_ID)/server/dist/$$target"; \
231+
fi; \
232+
done
223233
endif
224234
ifneq ($(HAS_WEBAPP),)
225235
if [ -d webapp/dist ]; then \
@@ -434,17 +444,17 @@ live-watch-webapp: apply
434444
.PHONY: deploy-to-mattermost-directory
435445
deploy-to-mattermost-directory:
436446
./build/bin/pluginctl disable $(PLUGIN_ID)
437-
mkdir -p $(FOCALBOARD_PLUGIN_PATH)
438-
cp $(MANIFEST_FILE) $(FOCALBOARD_PLUGIN_PATH)/
439-
cp -r webapp/pack $(FOCALBOARD_PLUGIN_PATH)/
440-
cp -r $(ASSETS_DIR) $(FOCALBOARD_PLUGIN_PATH)/
441-
cp -r public $(FOCALBOARD_PLUGIN_PATH)/
442-
mkdir -p $(FOCALBOARD_PLUGIN_PATH)/server
443-
cp -r server/dist $(FOCALBOARD_PLUGIN_PATH)/server/
444-
mkdir -p $(FOCALBOARD_PLUGIN_PATH)/webapp
445-
cp -r webapp/dist $(FOCALBOARD_PLUGIN_PATH)/webapp/
447+
mkdir -p $(BOARD_PLUGIN_PATH)
448+
cp $(MANIFEST_FILE) $(BOARD_PLUGIN_PATH)/
449+
cp -r webapp/pack $(BOARD_PLUGIN_PATH)/
450+
cp -r $(ASSETS_DIR) $(BOARD_PLUGIN_PATH)/
451+
cp -r public $(BOARD_PLUGIN_PATH)/
452+
mkdir -p $(BOARD_PLUGIN_PATH)/server
453+
cp -r server/dist $(BOARD_PLUGIN_PATH)/server/
454+
mkdir -p $(BOARD_PLUGIN_PATH)/webapp
455+
cp -r webapp/dist $(BOARD_PLUGIN_PATH)/webapp/
446456
./build/bin/pluginctl enable $(PLUGIN_ID)
447-
@echo plugin built at: $(FOCALBOARD_PLUGIN_PATH)
457+
@echo plugin built at: $(BOARD_PLUGIN_PATH)
448458

449459
# Help documentation à la https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
450460
help:

0 commit comments

Comments
 (0)