Skip to content

Commit

Permalink
Update build process to cleanup mutated files. Closes #81
Browse files Browse the repository at this point in the history
  • Loading branch information
pskrbasu committed Jan 3, 2024
1 parent 1a5a9db commit cccbb10
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ ifndef plugin
endif

build: validate_plugin
go run generate/generator.go templates . $(plugin) $(plugin_github_url)
go mod tidy

# Create a new directory for the build process
mkdir -p render

# Copy the entire source tree, excluding .git directory, into the new directory
rsync -a --exclude='.git' . render/ >/dev/null 2>&1

# Change to the new directory to perform operations
cd render && \
go run generate/generator.go templates . $(plugin) $(plugin_github_url) && \
go mod tidy && \
$(MAKE) -f out/Makefile build

# Copy the created binary from the render directory
cp render/steampipe_sqlite_$(plugin).so .

# Clean up the render directory
rm -rf render

# Note: The render directory will contain the full code tree with changes,
# binaries will be copied to the actual root directory, and then render will be deleted

0 comments on commit cccbb10

Please sign in to comment.