Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add snapcraft config and link to snap package in README #1086

Merged
merged 4 commits into from
Apr 4, 2019

Conversation

stilvoid
Copy link
Contributor

Issue #, if available: N/A

Description of changes: Add support for snapcraft package

Checklist:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

snapcraft.yaml Outdated

license: Apache-2.0

base: core18
Copy link
Contributor

@sriram-mv sriram-mv Mar 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!

Does this base image have the correct glibc support? We have had issues building a snap for sam cli because of that?

Has this been tested and verified to work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I have this working locally. I've gone through an init, package, and deploy successfully :)

@stilvoid
Copy link
Contributor Author

Updated so it no longer requires strict confinement thanks to some help on snapcraft forum :)

@@ -0,0 +1,5 @@
#!/usr/bin/env bash

HOME="$(getent passwd "${USER}" | cut -d: -f6)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: Why do you need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you've merged already but this is because, by default, within the snap's runtime $HOME is set to another folder. SAM needs access to the user's ~/.aws (granted by the personal-files plug) so we need to set $HOME to the proper folder :)

README.md Outdated
@@ -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/sam-cli)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change the package name to aws-sam-cli instead of sam-cli?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely and I've just got this registered (thanks @davdunc!)

@@ -0,0 +1,50 @@
name: sam-cli
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aws-sam-cli instead?

@sanathkr
Copy link
Contributor

sanathkr commented Apr 4, 2019

Thanks a ton for contributing this feature! Super helpful indeed. I have a few minor comments. Looks good otherwise.

@sanathkr
Copy link
Contributor

sanathkr commented Apr 4, 2019

Actually, I made the changes I propsed myself and pushed to your branch.

@sanathkr sanathkr merged commit d48992e into aws:develop Apr 4, 2019
@sanathkr
Copy link
Contributor

sanathkr commented Apr 4, 2019

@stilvoid Hey did you happened to register the name aws-sam-cli on snapcraft? I am unable to register this name there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants