Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
97c9a55
Merge pull request #509 from mindbox-cloud/master
AndreyEmtsov Nov 8, 2024
595d85b
MBX-3736: Change path for proguard rules (#510)
sergeysozinov Nov 18, 2024
a155a49
MBX-3647: Fix crash fetchTargetingInfo. Add tests
enotniy Nov 21, 2024
ecfda87
Merge pull request #512 from mindbox-cloud/feature/MBX-3647
enotniy Nov 21, 2024
62c961c
Updated scripts
Dec 26, 2024
1fa3860
PR Fix
Dec 27, 2024
2717992
Merge pull request #523 from mindbox-cloud/feature/WMSDK-387-Android-…
Vailence Dec 27, 2024
f896d8f
WMSDK-391: bump minSdk version
sergeysozinov Jan 10, 2025
29c20f1
WMSDK-395: bump jitpack jdk version
sergeysozinov Jan 21, 2025
1be5188
GITLAB-165: change dispatch step (#535)
AlexPoziev Feb 2, 2025
0d27aca
WMRUSTORE-5: Add multi tokens
enotniy Nov 28, 2024
969b339
WMRUSTORE-5: Follow code review
enotniy Nov 29, 2024
09fb558
WMRUSTORE-5: Fix empty tokens on firstInit
enotniy Dec 4, 2024
5e57895
WMRUSTORE-5: Fix empty tokens on firstInit
enotniy Dec 5, 2024
15b9c79
WMRUSTORE-5: Add mutex for appInfoUpdate
enotniy Dec 5, 2024
1a0969a
WMRUSTORE-9: Add mindbox-rustore module
enotniy Dec 9, 2024
c0ade0d
WMRUSTORE-9: Add proguard rules
enotniy Dec 9, 2024
8b8e4e7
WMRUSTORE-9: Add rustore to example
enotniy Dec 9, 2024
e914935
WMRUSTORE-9: Add signingConfigs to example
enotniy Dec 10, 2024
8d10494
WMRUSTORE-7: Add push Rustore push hadler
enotniy Dec 10, 2024
5b73131
WMRUSTORE-6: Increase min Api version rustore to 24
enotniy Dec 11, 2024
7e7d642
WMRUSTORE-12: Fix migration tokens format
enotniy Dec 12, 2024
4d5b813
WMRUSTORE-12: Fix migration lock
enotniy Dec 12, 2024
1510215
Hotfix InitializeLockTest tests
enotniy Dec 18, 2024
d6e8d6e
WMRUSTORE-12: Fix rustore init crash
enotniy Dec 18, 2024
83df1d5
Bump SDK version to 2.12.0-rc
enotniy Dec 18, 2024
b43abf9
Hotfix InitializeLockTest tests
enotniy Dec 18, 2024
dd8628f
WMRUSTORE-10: change preferences
enotniy Dec 13, 2024
7ad65cc
WMRUSTORE-10: add getPushTokensSaveDate method
enotniy Jan 9, 2025
db95f1f
WMRUSTORE-10: Add RuStore meta-data init
enotniy Jan 15, 2025
4dd3591
WMRUSTORE-24: remove init method
enotniy Jan 16, 2025
2e77914
WMSDK-396: add HuaweiPushActionsDeserializer
sergeysozinov Jan 17, 2025
41d600a
WMSDK-396: add proguard rules for huawei
sergeysozinov Jan 20, 2025
cd536e8
WMRUSTORE-14: Retrive push tokens async
enotniy Jan 20, 2025
e125fa0
WMRUSTORE-14: Add timeout for get push tokens
enotniy Jan 23, 2025
0d5242d
WMRUSTORE-36: Fix race condition for initPushServices
enotniy Jan 30, 2025
081e52c
WMRUSTORE-35: Add timeout for init push services
enotniy Jan 31, 2025
b4081fa
WMRUSTORE-34: Update Lifecycle lib
enotniy Jan 31, 2025
90a8124
WMRUSTORE-34: Add lifecycle proguard
enotniy Feb 3, 2025
20b7e99
WMRUSTORE-22: Prepare example app for rustore release
enotniy Feb 3, 2025
95029b6
WMRUSTORE-35: Fix timeouts for initPushServices and getPushTokens
enotniy Feb 3, 2025
19b149f
WMRUSTORE-22: Update docs for RuStore
enotniy Feb 5, 2025
6482722
Resolve conflicts
enotniy Feb 6, 2025
f68ce01
Merge pull request #541 from mindbox-cloud/mission/rustore
enotniy Feb 6, 2025
f3fa92b
Mission/Inapp_session
sergeysozinov Feb 10, 2025
39c0462
Bump SDK version to 2.13.0-rc
github-actions[bot] Feb 10, 2025
2938507
WMRUSTORE-36: Fix save config order
enotniy Feb 12, 2025
a9d18fa
Disable rustore provider for api below 22
enotniy Feb 12, 2025
1cf7d8a
WMSDK-410: change slidingExpiration contract
sergeysozinov Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/bump_versions_in_release_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

# Check if the parameter is provided
if [ $# -eq 0 ]; then
echo "Please provide the release version number as a parameter."
exit 1
fi

# Check if the version number matches the semver format
if ! [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+(-rc)?$ ]]; then
echo "The release version number does not match the semver format (X.Y.Z or X.Y.Z-rc)."
exit 1
fi

# Check the current Git branch
current_branch=$(git symbolic-ref --short HEAD)
echo "Currently on branch: $current_branch"

if [[ ! $current_branch =~ ^(release|support)/[0-9]+\.[0-9]+\.[0-9]+(-rc)?$ ]]; then
echo "The current Git branch ($current_branch) is not in the format 'release/X.Y.Z', 'release/X.Y.Z-rc', 'support/X.Y.Z' or 'support/X.Y.Z-rc'."
exit 1
fi

version=$1

# Show the current directory and its files
echo "Current directory: $(pwd)"
echo "Files in the current directory:"
ls -l

# Add changelog to the index and create a commit
properties_file="gradle.properties"
current_version=$(grep -E '^SDK_VERSION_NAME=' gradle.properties | cut -d'=' -f2)
sed -i "s/^SDK_VERSION_NAME=.*/SDK_VERSION_NAME=$version/" $properties_file
sed -i "s/^SDK_VERSION_NAME=.*/SDK_VERSION_NAME=$version/" $properties_file
build_gradle_example_path="example/app/build.gradle"
sed -i -E "s/cloud.mindbox:mobile-sdk:[0-9]+\.[0-9]+\.[0-9]+(-rc)?/cloud.mindbox:mobile-sdk:$version/" $build_gradle_example_path

echo "Bump SDK version from $current_version to $version."

git add $properties_file
git add -f $build_gradle_example_path
git commit -m "Bump SDK version to $version"

echo "Pushing changes to branch: $current_branch"
if ! git push origin $current_branch; then
echo "Failed to push changes to the origin $current_branch"
exit 1
fi
45 changes: 45 additions & 0 deletions .github/git-release-ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
set -e

version=$(grep '^SDK_VERSION_NAME=' gradle.properties | cut -d '=' -f2)

is_beta=false
if [[ $version == *"rc"* ]]; then
is_beta=true
fi

branch=${GITHUB_REF#refs/heads/}

echo "Version: $version"
echo "Is Beta: $is_beta"
echo "Branch: $branch"

echo "Fetching tags from remote repository."
git fetch --tags

if git rev-parse "$version" >/dev/null 2>&1; then
echo "Local tag $version already exists."
else
echo "Creating local tag $version."
git tag $version
fi

if git ls-remote --tags origin | grep -q "refs/tags/$version"; then
echo "Remote tag $version already exists."
else
echo "Pushing local tag $version to remote."
git push origin $version
fi

# Create release
release_title="Release $version"
text="Autogenerated release. Check more details at [Mindbox SDK Documentation](https://developers.mindbox.ru/docs/androidhuawei-native-sdk)"

echo "Release title: $release_title"
echo "Text: $text"

prerelease_flag=$([ "$is_beta" = true ] && echo "--prerelease" || echo "")

gh release create "$version" --target "$branch" --title "$release_title" --notes "$text" $prerelease_flag

echo "Release $version created for repo on branch $branch"
36 changes: 0 additions & 36 deletions .github/workflows/deploy.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/distribute_pushok.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Distribute PushOk

on:
pull_request:
types: [ closed ]
branches:
- develop
push:
branches:
- 'release/*'
- 'support/*'

jobs:
distribution:
if: github.event.pull_request.merged == true || (github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/support/')))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get last 3 commit messages
run: |
commits=$(git log -3 --pretty=format:"%s")
echo "commits=$commits" >> $GITHUB_ENV

- name: Trigger build & send to FAD
run: |
curl --location 'https://mindbox.gitlab.yandexcloud.net/api/v4/projects/900/trigger/pipeline' \
--form 'token="${{ secrets.GITLAB_TRIGGER_TOKEN }}"' \
--form 'ref="develop"' \
--form "variables[INPUT_BRANCH]=\"${{ github.head_ref || github.ref_name }}\"" \
--form "variables[INPUT_COMMITS]=\"${{ env.commits }}\""
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: SDK CI
name: Lint + UnitTests + Build

on:
push:
Expand All @@ -7,7 +7,9 @@ on:
- '!master'
paths-ignore:
- '**.md'

tags-ignore:
- '**'

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/prepare_release_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Prepare release branch

on:
push:
branches:
- 'release/*.*.*'
- 'support/*.*.*'

jobs:
extract_version:
if: github.event.created
name: Extract Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.extract.outputs.version }}
steps:
- name: Extract version from branch name
id: extract
run: |
BRANCH_NAME="${{ github.ref_name }}"
echo "BRANCH_NAME: $BRANCH_NAME"
VERSION="${BRANCH_NAME#release/}"
VERSION="${VERSION#support/}"
echo "VERSION: $VERSION"
echo "version=${VERSION}" >> $GITHUB_OUTPUT

bump_version:
name: Bump Version
runs-on: ubuntu-latest
needs: extract_version
outputs:
version2: ${{ steps.bump.outputs.version2 }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure Git identity for GitHub Action Bot
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Bump version
run: ./.github/bump_versions_in_release_branch.sh "${{ needs.extract_version.outputs.version }}"

- name: Ouput version
id: bump
run: |
echo "version2=${{ needs.extract_version.outputs.version }}" >> $GITHUB_OUTPUT

check_sdk_version:
name: Check SDK Version
runs-on: ubuntu-latest
needs: bump_version
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Pull latest changes
run: git pull

- name: Check if SDK_VERSION_NAME matches VERSION
run: |
SDK_VERSION=$(grep '^SDK_VERSION_NAME=' gradle.properties | cut -d '=' -f2)
EXPECTED_VERSION=${{ needs.bump_version.outputs.version2 }}

if [ "$SDK_VERSION" != "$EXPECTED_VERSION" ]; then
echo "SDK_VERSION_NAME ($ACTUAL_VERSION) does not match the expected version ($EXPECTED_VERSION)."
exit 1
fi
shell: bash

create_pull_request:
name: Create Pull Request
runs-on: ubuntu-latest
needs: check_sdk_version
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create Pull Request
run: |
gh pr create \
--base master \
--head ${{ github.ref_name }} \
--title "${{ github.ref_name }}" \
--body "Updates the release version to ${{ github.ref_name }}"
PR_URL=$(gh pr view --json url --jq '.url')
echo "PR_URL=$PR_URL" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Loading