forked from stevemac007/aws-to-slack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
Makefile
instead of individual build scripts
- Loading branch information
Andre Rabold
committed
Aug 11, 2017
1 parent
2f84b1b
commit 4c7bc0a
Showing
6 changed files
with
38 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
AWS_CLI?=/usr/local/bin/aws | ||
TEMP_PATH=.temp | ||
RELEASE_ZIP=build/release.zip | ||
|
||
.PHONY: deps | ||
deps: | ||
npm install | ||
|
||
.PHONY: package | ||
package: | ||
# Prepare | ||
-@rm -r "$(TEMP_PATH)" 2>/dev/null || true | ||
-@rm "$(RELEASE_ZIP)" 2>/dev/null || true | ||
@mkdir -p "$(TEMP_PATH)" | ||
|
||
# Copy sources to temporary folder | ||
@cp -R src package-lock.json package.json "$(TEMP_PATH)/" | ||
|
||
# Install dependencies | ||
@cd "$(TEMP_PATH)" && npm install --production | ||
|
||
# Package artifact | ||
@cd "$(TEMP_PATH)" && zip -r "../$(RELEASE_ZIP)" . | ||
|
||
# Cleanup | ||
@rm -r "$(TEMP_PATH)" | ||
|
||
.PHONY: publish | ||
publish: | ||
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack/" | ||
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.