Skip to content

Commit

Permalink
Use Makefile instead of individual build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Rabold committed Aug 11, 2017
1 parent 2f84b1b commit 4c7bc0a
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ indent_style = space
indent_style = tab
end_of_line = lf
charset = utf-8

[Makefile]
indent_style = tab
end_of_line = lf
charset = utf-8
31 changes: 31 additions & 0 deletions Makefile
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/"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Forward AWS CloudWatch Alarms and other notifications from Amazon SNS to Slack.
_AWS-to-Slack_ is a Lambda function written in Node.js that forwards alarms and
notifications to a dedicated [Slack](https://slack.com) channel. It self-hosted
in your own AWS environment and doesn't have any 3rd party dependencies other
than the Google Charts API for rendering graphs.
than the Google Charts API for rendering CloudWatch metrics.

Supported notification formats:
* CloudWatch Alarms
* CloudWatch Alarms (incl. Metrics)
* Elastic Beanstalk
* Generic SNS messages
* Plain text messages
Expand Down
Binary file modified build/release.zip
Binary file not shown.
21 changes: 0 additions & 21 deletions scripts/build.sh

This file was deleted.

4 changes: 0 additions & 4 deletions scripts/upload.sh

This file was deleted.

0 comments on commit 4c7bc0a

Please sign in to comment.