Skip to content

Commit

Permalink
Adds git-lfs to installdeps target
Browse files Browse the repository at this point in the history
Provides a convenient method for installing git-lfs, as part of the
install-required-dependencies step. Added a conditional check to ensure
that the wheels are indeed retrieved via git-lfs. This change is
required by developers only on first-run, thus the conditional, but
required in CI all the time, since the repo is cloned before deps are
installed.
  • Loading branch information
Conor Schaefer committed Jan 13, 2020
1 parent 9f51495 commit 2223628
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
14 changes: 0 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *clonesecuredroplog
- *getlatestreleasedversion
Expand All @@ -200,14 +199,12 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *clonesecuredroplog
- *getnightlyversion
- *makesourcetarball
- *updatedebianchangelog
- *builddebianpackage
- *installgitlfs
- *addsshkeys
- *commitworkstationdebs

Expand All @@ -216,7 +213,6 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *clonesecuredropclient
- *getlatestreleasedversion
Expand All @@ -228,14 +224,12 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *clonesecuredropclient
- *getnightlyversion
- *makesourcetarball
- *updatedebianchangelog
- *builddebianpackage
- *installgitlfs
- *addsshkeys
- *commitworkstationdebs

Expand All @@ -244,7 +238,6 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *clonesecuredropproxy
- *getlatestreleasedversion
Expand All @@ -256,14 +249,12 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *clonesecuredropproxy
- *getnightlyversion
- *makesourcetarball
- *updatedebianchangelog
- *builddebianpackage
- *installgitlfs
- *addsshkeys
- *commitworkstationdebs

Expand All @@ -272,7 +263,6 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *clonesecuredropexport
- *getlatestreleasedversion
Expand All @@ -284,14 +274,12 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *clonesecuredropexport
- *getnightlyversion
- *makesourcetarball
- *updatedebianchangelog
- *builddebianpackage
- *installgitlfs
- *addsshkeys
- *commitworkstationdebs

Expand All @@ -300,7 +288,6 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *setsvsdispname
- *setmetapackageversion
Expand All @@ -311,7 +298,6 @@ jobs:
- image: circleci/python:3.7-buster
steps:
- checkout
- *installgitlfs
- *installdeps
- *setsdgrsecname
- *setmetapackageversion
Expand Down
16 changes: 15 additions & 1 deletion scripts/install-deps
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Installs required dependencies for building SecureDrop Worsktation packages.
# Assumes a Debian 9 machine, ideally a Qubes AppVM.
# Assumes a Debian 10 machine, ideally a Qubes AppVM.

sudo apt-get update
sudo apt-get install \
Expand All @@ -10,7 +10,21 @@ sudo apt-get install \
dh-make \
dh-python \
dh-virtualenv \
git-lfs \
libffi-dev \
libssl-dev \
python3-all \
python3-setuptools


# Inspect the wheel files present locally. If repo was cloned
# without git-lfs, they'll be "text/plain", rather than "application/zip".
wheel_mime_types="$(find localwheels/ -type f -iname '*.whl' -exec file --mime-type {} + | perl -F':\s+' -lanE 'say $F[-1]' | sort -u)"
if [[ "$wheel_mime_types" != "application/zip" ]]; then
echo "Re-fetching git-lfs assets..."
git lfs install
# Re-fetch assets to resolve pointers to actual files
rm -r localwheels/
git checkout localwheels/
git lfs fetch
fi

0 comments on commit 2223628

Please sign in to comment.