Merge branch 'master' into develop
This commit is contained in:
commit
b27314a2a9
124
.gitlab-ci.yml
124
.gitlab-ci.yml
@ -1,12 +1,13 @@
|
|||||||
stages:
|
stages:
|
||||||
- environment
|
- environment
|
||||||
|
- fetch-version
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
- release
|
||||||
- internal
|
- internal
|
||||||
- alpha
|
- alpha
|
||||||
- beta
|
- beta
|
||||||
- production
|
- production
|
||||||
- stop
|
|
||||||
|
|
||||||
.updateContainerJob:
|
.updateContainerJob:
|
||||||
image: docker:stable
|
image: docker:stable
|
||||||
@ -46,17 +47,59 @@ ensureContainer:
|
|||||||
- pwd
|
- pwd
|
||||||
- echo "$signing_jks_file_hex" | xxd -r -p - > android-signing-keystore.jks
|
- echo "$signing_jks_file_hex" | xxd -r -p - > android-signing-keystore.jks
|
||||||
- md5sum android-signing-keystore.jks
|
- md5sum android-signing-keystore.jks
|
||||||
# get next version from latest changelog
|
|
||||||
- "export VERSION_CODE=`ls -f ./fastlane/metadata/android/en-US/changelogs | cut -d_ -f3 | sort -n | tail -1 | rev | cut -c5- | rev` && echo $VERSION_CODE"
|
|
||||||
# We add 200 to get this high enough above current versionCodes that are published
|
|
||||||
# - "export VERSION_CODE=$((200 + $CI_PIPELINE_IID)) && echo $VERSION_CODE"
|
|
||||||
- "export VERSION_SHA=`echo ${CI_COMMIT_SHA:0:8}` && echo $VERSION_SHA"
|
|
||||||
- "export VERSION_NAME=${VERSION_CODE:0:1}.${VERSION_CODE:1:1}.${VERSION_CODE:2} && echo $VERSION_NAME"
|
|
||||||
after_script:
|
after_script:
|
||||||
- rm -f android-signing-keystore.jks || true
|
- rm -f android-signing-keystore.jks || true
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- app/build/outputs
|
- app/build/outputs
|
||||||
|
- app/build.gradle
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
# https://levelup.gitconnected.com/semantic-versioning-and-release-automation-on-gitlab-9ba16af0c21
|
||||||
|
fetch-semantic-version:
|
||||||
|
image: node:13
|
||||||
|
stage: fetch-version
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
- alpha
|
||||||
|
- /^(([0-9]+)\.)?([0-9]+)\.x/ # This matches maintenance branches
|
||||||
|
- /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/ # This matches pre-releases
|
||||||
|
script:
|
||||||
|
- npm install @semantic-release/gitlab @semantic-release/exec @semantic-release/changelog @semantic-release/git -D
|
||||||
|
- npx semantic-release --generate-notes false --dry-run
|
||||||
|
- export VERSION_CODE=`grep -oP "versionCode[\s]*(\d)+" app/build.gradle | awk '{ print $2 }'`
|
||||||
|
- export VERSION_CODE=$((${VERSION_CODE}+1)) && echo ${VERSION_CODE}
|
||||||
|
- export VERSION_SHA=`echo ${CI_COMMIT_SHA:0:8}` && echo ${VERSION_SHA}
|
||||||
|
- export VERSION=`cat VERSION.txt` && echo ${VERSION}
|
||||||
|
- export VERSION_NAME=${VERSION}-${VERSION_SHA} && echo ${VERSION_NAME}
|
||||||
|
- sed -i -e "s/versionCode .*/versionCode ${VERSION_CODE}/g" app/build.gradle
|
||||||
|
- sed -i -e "s/versionName .*/versionName \"${VERSION_NAME}\"/g" app/build.gradle
|
||||||
|
- echo ${VERSION_CODE} > VERSION_CODE.txt
|
||||||
|
- echo ${VERSION_NAME} > VERSION_NAME.txt
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- VERSION.txt
|
||||||
|
- VERSION_CODE.txt
|
||||||
|
- VERSION_NAME.txt
|
||||||
|
- app/build.gradle
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
generate-non-semantic-version:
|
||||||
|
stage: fetch-version
|
||||||
|
except:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
- alpha
|
||||||
|
- /^(([0-9]+)\.)?([0-9]+)\.x/ # This matches maintenance branches
|
||||||
|
- /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/ # This matches pre-releases
|
||||||
|
script:
|
||||||
|
- echo build-$CI_PIPELINE_ID > VERSION.txt
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- VERSION.txt
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
@ -65,6 +108,16 @@ buildDebug:
|
|||||||
script:
|
script:
|
||||||
- bundle exec fastlane buildDebug
|
- bundle exec fastlane buildDebug
|
||||||
|
|
||||||
|
testDebug:
|
||||||
|
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
|
stage: test
|
||||||
|
dependencies:
|
||||||
|
- buildDebug
|
||||||
|
script:
|
||||||
|
- bundle exec fastlane test
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
buildRelease:
|
buildRelease:
|
||||||
extends: .build_job
|
extends: .build_job
|
||||||
script:
|
script:
|
||||||
@ -76,31 +129,25 @@ buildRelease:
|
|||||||
except:
|
except:
|
||||||
- branches
|
- branches
|
||||||
|
|
||||||
testDebug:
|
release:
|
||||||
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
image: node:13
|
||||||
stage: test
|
stage: release
|
||||||
dependencies:
|
|
||||||
- buildDebug
|
|
||||||
script:
|
|
||||||
- bundle exec fastlane test
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
publishGithub:
|
|
||||||
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
|
||||||
stage: internal
|
|
||||||
dependencies:
|
|
||||||
- buildRelease
|
|
||||||
when: manual
|
|
||||||
script:
|
|
||||||
- "export VERSION_CODE=`ls -f ./fastlane/metadata/android/en-US/changelogs | cut -d_ -f3 | sort -n | tail -1 | rev | cut -c5- | rev` && echo $VERSION_CODE"
|
|
||||||
- "export VERSION_SHA=`echo ${CI_COMMIT_SHA:0:8}` && echo $VERSION_SHA"
|
|
||||||
- "export VERSION_NAME=${VERSION_CODE:0:1}.${VERSION_CODE:1:1}.${VERSION_CODE:2} && echo $VERSION_NAME"
|
|
||||||
- ci-scripts/make-github-release.sh
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
only:
|
only:
|
||||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/i
|
refs:
|
||||||
|
- master
|
||||||
|
- alpha
|
||||||
|
# This matches maintenance branches
|
||||||
|
- /^(([0-9]+)\.)?([0-9]+)\.x/
|
||||||
|
# This matches pre-releases
|
||||||
|
- /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
|
||||||
|
script:
|
||||||
|
- npm install @semantic-release/gitlab @semantic-release/exec @semantic-release/changelog @semantic-release/git -D
|
||||||
|
- npx semantic-release
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- CHANGELOG.md
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
publishInternal:
|
publishInternal:
|
||||||
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
@ -120,6 +167,21 @@ publishInternal:
|
|||||||
only:
|
only:
|
||||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/i
|
- /^v[0-9]*\.[0-9]*\.[0-9]*$/i
|
||||||
|
|
||||||
|
publishGithub:
|
||||||
|
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
|
stage: internal
|
||||||
|
dependencies:
|
||||||
|
- buildRelease
|
||||||
|
when: manual
|
||||||
|
script:
|
||||||
|
- export VERSION_CODE=`cat VERSION_CODE.txt`
|
||||||
|
- export VERSION_NAME=`cat VERSION_NAME.txt`
|
||||||
|
- ci-scripts/make-github-release.sh
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
only:
|
||||||
|
- /^v[0-9]*\.[0-9]*\.[0-9]*$/i
|
||||||
|
|
||||||
.promote_job:
|
.promote_job:
|
||||||
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
when: manual
|
when: manual
|
||||||
|
25
.releaserc.yml
Normal file
25
.releaserc.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
plugins:
|
||||||
|
- "@semantic-release/commit-analyzer"
|
||||||
|
- - "@semantic-release/release-notes-generator"
|
||||||
|
- linkReferences: false
|
||||||
|
linkCompare: false
|
||||||
|
- - "@semantic-release/exec"
|
||||||
|
- verifyReleaseCmd: "echo ${nextRelease.version} > VERSION.txt"
|
||||||
|
generateNotesCmd: "if [[ ! -f RELEASE_NOTES.txt ]]; then echo '${nextRelease.notes.trim()}' > RELEASE_NOTES.txt; fi && echo '${nextRelease.notes.trim()}' > fastlane/metadata/android/en-US/changelogs/$(cat VERSION_CODE.txt).txt"
|
||||||
|
- - "@semantic-release/changelog"
|
||||||
|
- changelogFile: CHANGELOG.md
|
||||||
|
- - "@semantic-release/git"
|
||||||
|
- assets:
|
||||||
|
- 'app/build.gradle'
|
||||||
|
- 'CHANGELOG.md'
|
||||||
|
- 'VERSION.txt'
|
||||||
|
- "fastlane/metadata/android/en-US/changelogs/*.txt"
|
||||||
|
message: "chore(release): ${nextRelease.version} [only cd]\n\n${nextRelease.notes}"
|
||||||
|
- "@semantic-release/gitlab"
|
||||||
|
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
- "+([0-9])?(.{+([0-9]),x}).x"
|
||||||
|
- name: "alpha"
|
||||||
|
prerelease: "alpha"
|
@ -1,3 +1,10 @@
|
|||||||
|
# 1.1.0 (2021-02-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **lang:** Finnish Added 02bcd74
|
||||||
|
|
||||||
### Version 1.0.55 Tag: v1.0.55 (2021-01-29)
|
### Version 1.0.55 Tag: v1.0.55 (2021-01-29)
|
||||||
- Fixed incorrect model preventing video playback
|
- Fixed incorrect model preventing video playback
|
||||||
|
|
||||||
|
1
VERSION.txt
Normal file
1
VERSION.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
1.1.0
|
@ -44,8 +44,8 @@ android {
|
|||||||
applicationId "net.schueller.peertube"
|
applicationId "net.schueller.peertube"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode Integer.valueOf(System.getenv("VERSION_CODE") ?: 1)
|
versionCode 1056
|
||||||
versionName System.getenv("VERSION_NAME") + "-" + System.getenv("VERSION_SHA")
|
versionName "1.1.0-12d85f58"
|
||||||
buildConfigField "long", "BUILD_TIME", readPropertyWithDefault('buildTimestamp', System.currentTimeMillis()) + 'L'
|
buildConfigField "long", "BUILD_TIME", readPropertyWithDefault('buildTimestamp', System.currentTimeMillis()) + 'L'
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
6
fastlane/metadata/android/en-US/changelogs/1056.txt
Normal file
6
fastlane/metadata/android/en-US/changelogs/1056.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# 1.1.0 (2021-02-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **lang:** Finnish Added 02bcd74
|
Loading…
Reference in New Issue
Block a user