Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Briar Desktop
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
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
Briar Desktop
Commits
4bae0c55
Unverified
Commit
4bae0c55
authored
8 months ago
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
As current briar-core is a beta release, grab the version from the beta tag
parent
0f613510
No related branches found
No related tags found
1 merge request
!381
Upgrade toolchain and dependencies
Pipeline
#17504
passed
8 months ago
Stage: test
Stage: build
Changes
1
Pipelines
5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildSrc/src/main/kotlin/org/briarproject/briar/desktop/builddata/GenerateBuildDataSourceTask.kt
+7
-6
7 additions, 6 deletions
...ct/briar/desktop/builddata/GenerateBuildDataSourceTask.kt
with
7 additions
and
6 deletions
buildSrc/src/main/kotlin/org/briarproject/briar/desktop/builddata/GenerateBuildDataSourceTask.kt
+
7
−
6
View file @
4bae0c55
...
...
@@ -198,9 +198,10 @@ open class GenerateBuildDataSourceTask : AbstractBuildDataTask() {
val
coreCommitToTag
=
mapCommitsToTags
(
gitBriar
)
// Get latest core tag
val
coreReleaseTag
=
getLastReleaseTag
(
gitBriar
,
coreCommitToTag
)
val
tagPrefix
=
"beta"
// TODO: change back to "release" when possible
val
coreReleaseTag
=
getLastTagWithPrefix
(
gitBriar
,
coreCommitToTag
,
tagPrefix
)
?:
throw
GradleException
(
"Unable to determine last core release tag"
)
val
coreVersion
=
coreReleaseTag
.
name
.
substring
(
"refs/tags/
release-"
.
length
)
val
coreVersion
=
coreReleaseTag
.
name
.
substring
(
"refs/tags/
$tagPrefix-"
.
length
)
+
" ($tagPrefix)"
// Get direct and transitive dependencies
val
artifacts
=
mutableListOf
<
VersionedArtifact
>()
...
...
@@ -272,16 +273,16 @@ open class GenerateBuildDataSourceTask : AbstractBuildDataTask() {
return
iterator
.
next
()
}
private
fun
getLast
ReleaseTag
(
git
:
Git
,
commitToTag
:
Map
<
RevCommit
,
Ref
>):
Ref
?
{
// We used to use just the most recent
release
tag, however that might return
private
fun
getLast
TagWithPrefix
(
git
:
Git
,
commitToTag
:
Map
<
RevCommit
,
Ref
>
,
prefix
:
String
):
Ref
?
{
// We used to use just the most recent tag, however that might return
// a more recent version than we're actually using. Hence traverse the history and
// use the first
release
tag found in the history starting from the current HEAD.
// use the first tag found in the history starting from the current HEAD.
val
commits
=
git
.
log
().
call
()
val
iterator
:
Iterator
<
RevCommit
>
=
commits
.
iterator
()
while
(
iterator
.
hasNext
())
{
val
commit
=
iterator
.
next
()
val
tag
=
commitToTag
[
commit
]
if
(
tag
!=
null
&&
tag
.
name
.
startsWith
(
"refs/tags/
release
-"
))
{
if
(
tag
!=
null
&&
tag
.
name
.
startsWith
(
"refs/tags/
$prefix
-"
))
{
return
tag
}
}
...
...
...
...
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