diff --git a/lambda2/build.sh b/lambda2/build.sh index 36f13bd..e96b43c 100755 --- a/lambda2/build.sh +++ b/lambda2/build.sh @@ -5,7 +5,10 @@ rm layer.zip docker run --rm -v "$PWD":/tmp/layer lambci/yumda:2 bash -c " - yum install -y git-${GIT_VERSION} && \ + curl -sSf 'https://packagecloud.io/install/repositories/github/git-lfs/config_file.repo?os=amzn&dist=2&source=script' > /lambda/etc/yum.repos.d/github_git-lfs.repo && \ + yum -q makecache -y --disablerepo='*' --enablerepo='github_git-lfs' --enablerepo='github_git-lfs-source' && \ + yum install -y git-${GIT_VERSION} git-lfs-${GIT_LFS_VERSION} && \ + mv /lambda/usr/bin/git-lfs /lambda/opt/bin/git-lfs && \ cd /lambda/opt && \ zip -yr /tmp/layer/layer.zip . " diff --git a/lambda2/config.sh b/lambda2/config.sh index f7d01b6..7a37c4b 100644 --- a/lambda2/config.sh +++ b/lambda2/config.sh @@ -1,2 +1,3 @@ export LAYER_NAME=git-lambda2 export GIT_VERSION=2.29.0 +export GIT_LFS_VERSION=2.12.1 diff --git a/lambda2/test/index.js b/lambda2/test/index.js index 8fc41ee..9fd35cb 100644 --- a/lambda2/test/index.js +++ b/lambda2/test/index.js @@ -12,4 +12,6 @@ exports.handler = async(event) => { execSync('ldd /opt/bin/ssh', { encoding: 'utf8', stdio: 'inherit' }) execSync('ssh -V', { encoding: 'utf8', stdio: 'inherit' }) + + execSync('git lfs', { encoding: 'utf8', stdio: 'inherit' }) }