Skip to content

Commit

Permalink
analyzer: Add support for the CocoaPods dependency manager
Browse files Browse the repository at this point in the history
Co-authored-by: Frank Viernau <frank.viernau@here.com>
Signed-off-by: Piet Brauer-Kallenberg <piet.brauer-kallenberg@mhp.com>
Signed-off-by: Frank Viernau <frank.viernau@here.com>
  • Loading branch information
pietbrauer and fviernau committed Jun 15, 2021
1 parent 1be64ba commit 0b631da
Show file tree
Hide file tree
Showing 17 changed files with 2,036 additions and 27 deletions.
9 changes: 9 additions & 0 deletions .azure-pipelines/LinuxAnalyzerTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ jobs:
mkdir -p $HOME/go/bin
curl https://raw.githubusercontent.com/golang/dep/v$GO_DEP_VERSION/install.sh | sh
# Install CocoaPods
sudo apt-get -qq ruby-dev
git clone https://github.com/CocoaPods/CocoaPods.git
cd CocoaPods
gem build cocoapods.gemspec
gem install *.gem
cd ..
export PATH=$PATH:$GEM_PATH/bin
# Update PATH for next steps, see:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash#prependpath-prepend-a-path-to-the--path-environment-variable
echo "##vso[task.prependpath]$HOME/.local/bin"
Expand Down
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ENV \
GOPATH=$HOME/go

ENV DEBIAN_FRONTEND=noninteractive \
PATH="$PATH:$HOME/.local/bin:$GOPATH/bin:/opt/go/bin"
PATH="$PATH:$HOME/.local/bin:$GOPATH/bin:/opt/go/bin:$GEM_PATH/bin"

# Apt install commands.
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
Expand Down Expand Up @@ -110,6 +110,7 @@ RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/
python3-dev \
python3-pip \
python3-setuptools \
ruby-dev \
sbt=$SBT_VERSION \
&& \
rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -149,6 +150,16 @@ RUN /opt/ort/bin/import_proxy_certs.sh && \
SDK_MANAGER_PROXY_OPTIONS="--proxy=http --proxy_host=${PROXY_HOST_AND_PORT%:*} --proxy_port=${PROXY_HOST_AND_PORT##*:}"; \
fi && \
yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager $SDK_MANAGER_PROXY_OPTIONS --sdk_root=$ANDROID_HOME "platform-tools" && \
# Install 'CocoaPods'. As https://github.com/CocoaPods/CocoaPods/pull/10609 is needed but not yet released, make a
# build from the latest revision of the master branch.
git clone https://github.com/CocoaPods/CocoaPods.git && \
cd CocoaPods && \
git checkout 9461b346aeb8cba6df71fd4e71661688138ec21b && \
gem build cocoapods.gemspec && \
gem install *.gem && \
cd .. && \
rm -rf CocoaPods && \
pod repo add main https://github.com/CocoaPods/Specs.git --allow-root && \
# Add scanners (in versions known to work).
curl -ksSL https://github.com/nexB/scancode-toolkit/archive/v$SCANCODE_VERSION.tar.gz | \
tar -zxC /usr/local && \
Expand Down
Empty file.
Loading

0 comments on commit 0b631da

Please sign in to comment.