Expose version string in embedded SwiftPM and AAR (#3144)
* Expose version string in embedded SwiftPM and AAR Implements https://github.com/element-hq/element-call/issues/3143 * Fix filename * Fix location of `Version.kt` * Use the right path for the sed replacement in the publishing workflow for Android --------- Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
12
.github/workflows/publish-embedded-packages.yaml
vendored
12
.github/workflows/publish-embedded-packages.yaml
vendored
@@ -124,6 +124,9 @@ jobs:
|
|||||||
- name: Get artifact version
|
- name: Get artifact version
|
||||||
run: echo "ARTIFACT_VERSION=${VERSION:1}" >> "$GITHUB_ENV"
|
run: echo "ARTIFACT_VERSION=${VERSION:1}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Set version string
|
||||||
|
run: sed -i "s/0.0.0/${{ env.ARTIFACT_VERSION }}/g" embedded/android/lib/src/main/kotlin/io/element/android/call/embedded/Version.kt
|
||||||
|
|
||||||
- name: Publish AAR
|
- name: Publish AAR
|
||||||
working-directory: embedded/android
|
working-directory: embedded/android
|
||||||
env:
|
env:
|
||||||
@@ -165,13 +168,16 @@ jobs:
|
|||||||
- name: Copy files
|
- name: Copy files
|
||||||
run: rsync -a --delete --exclude .git element-call/embedded/ios/ element-call-swift
|
run: rsync -a --delete --exclude .git element-call/embedded/ios/ element-call-swift
|
||||||
|
|
||||||
|
- name: Get artifact version
|
||||||
|
run: echo "ARTIFACT_VERSION=${VERSION:1}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Set version string
|
||||||
|
run: sed -i "s/0.0.0/${{ env.ARTIFACT_VERSION }}/g" element-call-swift/Sources/EmbeddedElementCall/EmbeddedElementCall.swift
|
||||||
|
|
||||||
- name: Test build
|
- name: Test build
|
||||||
working-directory: element-call-swift
|
working-directory: element-call-swift
|
||||||
run: swift build
|
run: swift build
|
||||||
|
|
||||||
- name: Get artifact version
|
|
||||||
run: echo "ARTIFACT_VERSION=${VERSION:1}" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Commit and tag
|
- name: Commit and tag
|
||||||
working-directory: element-call-swift
|
working-directory: element-call-swift
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2025 New Vector Ltd.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
|
* Please see LICENSE files in the repository root for full details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const val VERSION = "0.0.0"
|
||||||
@@ -1,5 +1,14 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2025 New Vector Ltd.
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public let appURL = Bundle.module.url(forResource: "index", withExtension: "html", subdirectory: "dist")
|
public let appURL = Bundle.module.url(forResource: "index", withExtension: "html", subdirectory: "dist")
|
||||||
|
|
||||||
public let bundle = Bundle.module
|
public let bundle = Bundle.module
|
||||||
|
|
||||||
|
public let version = "0.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user