Updated on 2026-08-14
This commit is contained in:
parent
91b78deb4a
commit
42910c9a07
10 changed files with 117 additions and 0 deletions
50
ci_resources/Dockerfile.android
Normal file
50
ci_resources/Dockerfile.android
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
FROM ubuntu:24.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV ANDROID_HOME=/opt/android-sdk
|
||||
ENV BUNDLE_PATH=vendor/bundle
|
||||
ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/34.0.0:$BUNDLE_PATH/bin
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
ENV LANG=en_US.UTF-8
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
openjdk-17-jdk \
|
||||
wget \
|
||||
unzip \
|
||||
curl \
|
||||
git \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
build-essential \
|
||||
&& apt-get clean
|
||||
|
||||
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
|
||||
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \
|
||||
echo "deb [signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list && \
|
||||
apt-get update && apt-get install -y gh && \
|
||||
apt-get clean
|
||||
|
||||
RUN mkdir -p $ANDROID_HOME/cmdline-tools/latest && \
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip -O /tmp/cmdline-tools.zip && \
|
||||
unzip /tmp/cmdline-tools.zip -d $ANDROID_HOME/cmdline-tools/latest && \
|
||||
mv $ANDROID_HOME/cmdline-tools/latest/cmdline-tools/* $ANDROID_HOME/cmdline-tools/latest/ && \
|
||||
rm -rf $ANDROID_HOME/cmdline-tools/latest/cmdline-tools && \
|
||||
rm -f /tmp/cmdline-tools.zip && \
|
||||
yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses && \
|
||||
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-31" "platforms;android-34" "build-tools;34.0.0"
|
||||
|
||||
RUN wget https://github.com/lzhiyong/android-sdk-tools/releases/download/34.0.3/android-sdk-tools-static-aarch64.zip -O /tmp/android-sdk-tools-static-aarch64.zip && \
|
||||
unzip /tmp/android-sdk-tools-static-aarch64.zip -d /tmp/android-sdk-tools-static-arm && \
|
||||
cp -r /tmp/android-sdk-tools-static-arm/build-tools/* $ANDROID_HOME/build-tools/34.0.0/ && \
|
||||
rm -rf /tmp/android-sdk-tools-static-arm /tmp/android-sdk-tools-static-aarch64.zip
|
||||
|
||||
RUN gem install bundler:2.5.23
|
||||
RUN gem install fastlane -v 2.211.0 -N -V
|
||||
RUN gem install fastlane-plugin-firebase_app_distribution -v 0.9.1 -N -V
|
||||
|
||||
COPY ../Gemfile Gemfile.lock ./
|
||||
RUN bundle install --jobs=4 --retry=3 --verbose
|
||||
|
||||
RUN bundle exec fastlane -v
|
||||
|
||||
CMD ["bash"]
|
||||
19
ci_resources/Dockerfile.lightweight
Normal file
19
ci_resources/Dockerfile.lightweight
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
FROM ubuntu:24.04
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
git \
|
||||
&& apt-get clean
|
||||
|
||||
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
|
||||
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \
|
||||
echo "deb [signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list && \
|
||||
apt-get update && apt-get install -y gh && \
|
||||
apt-get clean
|
||||
|
||||
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
|
||||
apt-get install -y git-lfs && \
|
||||
git lfs install && \
|
||||
apt-get clean
|
||||
|
||||
CMD ["bash"]
|
||||
48
ci_resources/find-latest-pre-release-branch.sh
Executable file
48
ci_resources/find-latest-pre-release-branch.sh
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
# Input args
|
||||
if [ -z "$1" ]; then
|
||||
echo "Error: No base branch argument provided or empty string given."
|
||||
echo "Usage: $0 <base-branch>"
|
||||
exit 1
|
||||
fi
|
||||
base_branch=$1
|
||||
|
||||
# Initialize variables to store the latest release branch and merge base
|
||||
latest_branch=""
|
||||
latest_merge_base=""
|
||||
|
||||
# Source refs to find branches from
|
||||
local_refs="refs/heads/releases/*" # For debug and development
|
||||
remote_refs=$(git for-each-ref --format="%(refname:short)" refs/remotes/origin/ | grep -E "origin/[a-zA-Z0-9._-]+_pre_release$")
|
||||
|
||||
# Iterate over all remote release branches sorted by commit date (most recent first)
|
||||
for branch in $remote_refs; do
|
||||
merge_base=$(git merge-base "$base_branch" "$branch")
|
||||
|
||||
echo "Merge base for branches '$branch' and '$base_branch' is '$merge_base'"
|
||||
|
||||
if [ -z "$latest_merge_base" ] || git rev-list "$merge_base..$base_branch" | grep -q .; then
|
||||
echo "Update"
|
||||
latest_branch="$branch"
|
||||
latest_merge_base="$merge_base"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Latest branch: $latest_branch"
|
||||
echo "Latest merge base: $latest_merge_base"
|
||||
|
||||
|
||||
# Output validation
|
||||
if [ -z "$latest_branch" ]; then
|
||||
echo "Error: Can't find the latest 'pre_release' branch for the base branch '$base_branch'"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Stripping 'origin/' prefix if needed
|
||||
latest_branch="${latest_branch#origin/}"
|
||||
|
||||
echo "$latest_branch" > "find-latest-pre-release-branch.output"
|
||||
echo "Latest release branch created directly from '$base_branch' or its ancestor: '$latest_branch'"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue