Skip to content

Commit

Permalink
Update makefile (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
suthar26 authored Oct 2, 2024
1 parent 42c7aae commit 056003c
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,30 @@ zip:
zip -r app.zip . -x "*.DS_Store" -x "node_modules/*" -x "yarn.lock" -x "package-lock.json" -x "*.zip" -x "*.sh" -x ".git*" -x "out/*" -x "package*" -x "out/*" -x "test-app/*" -x "test-app.zip" -x "tests/*"
@cd test-app && zip -r ../test-app.zip . && cd ..

VERSION := $(if $(VERSION),$(VERSION),0.0.0)

VERSION := $(if $(VERSION),$(VERSION),0.0.0)

bundle:
$(eval VERSION := $(if $(VERSION),$(VERSION),0.0.0))
@touch components/DevCycle/DevCycle.brs
@find components/DevCycle -name "*.brs" | grep -vE "Task|DevCycle\.brs" | xargs cat > components/DevCycle/DevCycle.brs
@rm -rf package package.zip && mkdir -p package
@cp -r components/DevCycle/DevCycle.brs package/DevCycle.brs
@cp -r components/DevCycle/DevCycleTask.brs package/DevCycleTask.brs
@cp -r components/DevCycle/DevCycleTask.xml package/DevCycleTask.xml
@sed -i '' '\
/uri="pkg:\/components\/DevCycle\/DevCycleSGClient.brs"/d; \
/uri="pkg:\/components\/DevCycle\/DevCycleUser.brs"/d; \
/uri="pkg:\/components\/DevCycle\/DevCycleOptions.brs"/d; \
s/uri="pkg:\/components\/DevCycle\/DevCycleClient.brs"/uri="pkg:\/components\/DevCycle\/DevCycle.brs"/; \
' package/DevCycleTask.xml
@if [ "$(shell uname)" = "Darwin" ]; then \
sed -i '' -e '/uri="pkg:\/components\/DevCycle\/DevCycleSGClient.brs"/d' \
-e '/uri="pkg:\/components\/DevCycle\/DevCycleUser.brs"/d' \
-e '/uri="pkg:\/components\/DevCycle\/DevCycleOptions.brs"/d' \
-e 's|uri="pkg:\/components\/DevCycle\/DevCycleClient.brs"|uri="pkg:\/components\/DevCycle\/DevCycle.brs"|g' \
package/DevCycleTask.xml; \
else \
sed -i -e '/uri="pkg:\/components\/DevCycle\/DevCycleSGClient.brs"/d' \
-e '/uri="pkg:\/components\/DevCycle\/DevCycleUser.brs"/d' \
-e '/uri="pkg:\/components\/DevCycle\/DevCycleOptions.brs"/d' \
-e 's|uri="pkg:\/components\/DevCycle\/DevCycleClient.brs"|uri="pkg:\/components\/DevCycle\/DevCycle.brs"|g' \
package/DevCycleTask.xml; \
fi
@zip -r package-$(VERSION).zip package

test-app: bundle
Expand Down

0 comments on commit 056003c

Please sign in to comment.