Skip to content
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
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.ONESHELL: # support multiline commands

.PHONY: build
build:
echo "This command exists as CI expects BUILD command to be available"
Expand Down Expand Up @@ -42,3 +44,17 @@ repin:

.PHONY: push-additional-images
push-additional-images:

REPORT_KT=platform/jvm/capture/src/main/kotlin/io/bitdrift/capture/reports/binformat/v1/Report.kt
REPORT_FBS_PATH=bitdrift_public/fbs/issue-reporting/v1
REPORT_FBS_GEN_PATH=$(subst -,_,$(REPORT_FBS_PATH))

.PHONY: gen-flatbuffers
gen-flatbuffers: $(REPORT_KT)

.PHONY: $(REPORT_KT) # ignore timestamp
$(REPORT_KT): ../api/src/$(REPORT_FBS_PATH)/report.fbs
@flatc --gen-onefile --kotlin -I ../api/src $^
@mv $(REPORT_FBS_GEN_PATH)/report.kt $@
@python ci/license_header.py $@
@sed -i '' -e s/$(subst /,.,$(REPORT_FBS_GEN_PATH))/io.bitdrift.capture.reports.binformat.v1/ $@
11 changes: 10 additions & 1 deletion ci/license_header.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Insert license headers on files, running over all of particular types in the
# current directory if no particular files specified
import os
from sys import argv

# Define the header you want to check for and insert
header = """
Expand Down Expand Up @@ -64,4 +67,10 @@ def iterate_over_files():


# Run the script
iterate_over_files()
if __name__ == '__main__':
files = argv[1:]
if files:
for path in files:
check_file(path)
else:
iterate_over_files()
Loading