diff --git a/README.md b/README.md index c2ad58f588..900ead7e80 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ Status](https://travis-ci.org/awslabs/aws-sam-cli.svg?branch=develop) ![GitHub-release](https://img.shields.io/github/release/awslabs/aws-sam-cli.svg) ![PyPI version](https://badge.fury.io/py/aws-sam-cli.svg) +[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/aws-sam-cli) + [Join the SAM developers channel (\#samdev) on Slack](https://join.slack.com/t/awsdevelopers/shared_invite/enQtMzg3NTc5OTM2MzcxLTdjYTdhYWE3OTQyYTU4Njk1ZWY4Y2ZjYjBhMTUxNGYzNDg5MWQ1ZTc5MTRlOGY0OTI4NTdlZTMwNmI5YTgwOGM/) to collaborate with fellow community members and the AWS SAM team. diff --git a/snap/local/launchers/launcher.sh b/snap/local/launchers/launcher.sh new file mode 100755 index 0000000000..764b7f8268 --- /dev/null +++ b/snap/local/launchers/launcher.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +HOME="$(getent passwd "${USER}" | cut -d: -f6)" + +exec "${@}" diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000000..2ab2e0a434 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,50 @@ +name: aws-sam-cli +version: git +summary: The AWS SAM CLI tool for the AWS Serverless Application Model +description: > + `sam` is the AWS CLI tool for managing Serverless applications written + with the AWS Serverless Application Model (SAM). + SAM CLI can be used to test functions locally, start a local API Gateway + from a SAM template, validate a SAM template, fetch logs, generate sample + payloads for various event sources, and generate a SAM project in your + favorite Lambda Runtime. + +license: Apache-2.0 + +base: core18 + +grade: stable +confinement: strict + +plugs: + personal-files: + read: + - $HOME/.aws + +parts: + launchers: + plugin: dump + source: snap/local/launchers + organize: + "*": bin/ + + aws-sam-cli: + plugin: python + python-version: python3 + python-packages: + - awscli + requirements: + - requirements/base.txt + source: . + +apps: + aws-sam-cli: + adapter: full + command-chain: + - bin/launcher.sh + command: bin/sam + #plugs: + # - home + environment: + LC_ALL: C.UTF-8 + LANG: C.UTF-8