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 <[email protected]>
Signed-off-by: Piet Brauer-Kallenberg <[email protected]>
Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
pietbrauer and fviernau committed Jun 17, 2021
1 parent 1be64ba commit 77646be
Show file tree
Hide file tree
Showing 17 changed files with 2,058 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .azure-pipelines/LinuxAnalyzerTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ jobs:
mkdir -p $HOME/go/bin
curl https://raw.githubusercontent.com/golang/dep/v$GO_DEP_VERSION/install.sh | sh
# 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
gem build cocoapods.gemspec
sudo gem install cocoapods-1.10.1.gem
# 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
7 changes: 7 additions & 0 deletions .azure-pipelines/WindowsAnalyzerTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ jobs:
## Install git-repo.
Invoke-WebRequest -Uri "https://storage.googleapis.com/git-repo-downloads/repo" -OutFile "$env:PROGRAMFILES\Git\usr\bin\repo"
# 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
gem build cocoapods.gemspec
sudo gem install cocoapods-1.10.1.gem
# Update PATH for next steps, see:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=powershell#prependpath-prepend-a-path-to-the--path-environment-variable
echo "##vso[task.setvariable variable=path;]$env:PATH"
Expand Down
12 changes: 11 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,15 @@ 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 cocoapods-1.10.1.gem && \
cd .. && \
rm -rf CocoaPods && \
# 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 77646be

Please sign in to comment.