Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
org.benoitharrault.random
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
android
org.benoitharrault.random
Commits
a40c3c6e
Commit
a40c3c6e
authored
3 years ago
by
Benoît Harrault
Browse files
Options
Downloads
Plain Diff
Merge branch '12-skip-build-release-if-version-is-not-changed' into 'master'
Resolve "Skip build / release if version is not changed" Closes
#12
See merge request
!8
parents
cd9f455d
b0986c87
No related branches found
No related tags found
1 merge request
!8
Resolve "Skip build / release if version is not changed"
Pipeline
#1501
passed
3 years ago
Stage: update
Stage: build-debug
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+13
-3
13 additions, 3 deletions
.gitlab-ci.yml
with
13 additions
and
3 deletions
.gitlab-ci.yml
+
13
−
3
View file @
a40c3c6e
...
...
@@ -63,9 +63,19 @@ android:build-release:
-
echo keyAlias=$ANDROID_KEY_ALIAS >> android/key.properties
-
echo keyPassword=$ANDROID_KEY_PASSWORD >> android/key.properties
# build flutter app
-
flutter packages get
-
flutter clean
-
flutter build apk --release
-
VERSION_FILE="$(find . -name 'gradle.properties' | head -n1)"
-
VERSION_NAME="$(grep '^app.versionName=' "${VERSION_FILE}" | cut -d'=' -f2)"
-
VERSION_CODE="$(grep '^app.versionCode=' "${VERSION_FILE}" | cut -d'=' -f2)"
-
TAG_NAME="Release_${VERSION_NAME}_${VERSION_CODE}"
-
echo "${TAG_NAME}"
-
>
if [ $(git tag -l "${TAG_NAME}") ]; then
echo "Tag ${TAG_NAME} already exists. Skipping build release."
else
flutter packages get
flutter clean
flutter build apk --release
fi
# prepare artifact
-
find . -name "*.apk"
# where is my apk?
artifacts
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment