Skip to content

Commit

Permalink
Makefile improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 committed Apr 23, 2024
1 parent dc4f7d4 commit fe2a906
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions integrations/amazon-security-lake/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@

ZIP_NAME = wazuh_to_amazon_security_lake
TARGET = package
SRC = src

# Main target
pack: pack_deps pack_src

.ONESHELL:
pack_deps: $(TARGET)
cd $(TARGET)
zip -r ../$(ZIP_NAME).zip .
$(ZIP_NAME).zip: $(TARGET) $(SRC)/lambda_function.py $(SRC)/wazuh_ocsf_converter.py
@cd $(TARGET)
@zip -r ../$(ZIP_NAME).zip .
@cd ../$(SRC)
@zip ../$@ lambda_function.py wazuh_ocsf_converter.py
@zip ../$@ models -r

.ONESHELL:
$(TARGET):
docker run -v `pwd`:/src -w /src \
python:3.12 \
Expand All @@ -22,12 +23,6 @@ $(TARGET):
--only-binary=:all: --upgrade \
-r requirements.aws.txt

.ONESHELL:
pack_src:
@cd src
@zip ../$(ZIP_NAME).zip lambda_function.py wazuh_ocsf_converter.py
@zip ../$(ZIP_NAME).zip models -r

clean:
@rm -rf $(TARGET)
@py3clean .

0 comments on commit fe2a906

Please sign in to comment.