Skip to content

Commit

Permalink
[aws-cli] Add plan.ps1 to aws-cli
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Duffield <tom@chef.io>
  • Loading branch information
tduffield committed May 3, 2019
1 parent 8943b8f commit 6c953d8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions aws-cli/plan.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
$pkg_name="aws-cli"
$pkg_origin="core"
$pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
$pkg_license=('Apache-2.0')
$pkg_description="The AWS Command Line Interface (CLI) is a unified tool to \
manage your AWS services. With just one tool to download and configure, you \
can control multiple AWS services from the command line and automate them \
through scripts."
$pkg_upstream_url="https://aws.amazon.com/cli/"
$pkg_deps=@(
"core/python"
)
$pkg_bin_dirs=@("Scripts")

function pkg_version {
pip search --disable-pip-version-check awscli | %{ if( $_ -match "^awscli \((.+)\)") { $matches[1]; } }
}

function Invoke-Before {
Set-PkgVersion
}

function Invoke-Prepare {
python -m virtualenv "$pkg_prefix"
."$pkg_prefix/Scripts/activate"
}

function Invoke-Install {
pip install "awscli==$pkg_version"
# Write out versions of all pip packages to package
pip freeze > "$pkg_prefix/requirements.txt"
}

0 comments on commit 6c953d8

Please sign in to comment.