Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build when source was not cloned from git repo #200

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 66 additions & 0 deletions .github/workflows/build_without_gitrepo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build without git repo

on:
push:
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.github/workflows/macos_pkg.yml'
pull_request:
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.github/workflows/macos_pkg.yml'
workflow_dispatch:
inputs:
version:
description: dummy
default: dummy

defaults:
run:
shell: bash

jobs:
build-linux-without-gitrepo:
name: Nightly Linux Build without git repo
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: install dependencies
run: |
sudo apt-get update && \
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
rpm \
openjdk-17-jdk \
openjdk-17-jdk-headless

- name: show java version
run: type -a java;java -version

- name: set java version
run: sudo update-java-alternatives -s java-1.17.0-openjdk-amd64

- name: show java version
run: type -a java;java -version

- name: remove git repo
run: ls -al ; rm -Rf .git/ ; ls -al

- name: build workaround
run: git init

- name: remove git command
run: |
sudo DEBIAN_FRONTEND=noninteractive \
apt-get remove -y git

- name: check for git command
run: type -a git || echo "git command removed"

- name: build package
run: id;pwd;ls -al;./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 -x detekt build

8 changes: 7 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ buildConfig {
}
catch (e: Exception)
{
buildConfigField("String", "GIT_BRANCH", "\"" + "????" + "\"")
try
{
buildConfigField("String", "GIT_BRANCH", "\"" + "????" + "\"")
}
catch (e: Exception)
{
}
buildConfigField("String", "GIT_COMMIT_HASH", "\"" + "????" + "\"")
buildConfigField("String", "GIT_COMMIT_DATE", "\"" + "????" + "\"")
buildConfigField("String", "GIT_COMMIT_MSG", "\"" + "????" + "\"")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.zoffcc.applications.trifa.Log

sealed interface MessageAction
{
data class SendMessagesBulk(val messages: List<UIMessage>, val toxpk: String) : MessageAction
// data class SendMessagesBulk(val messages: List<UIMessage>, val toxpk: String) : MessageAction
data class SendMessage(val message: UIMessage) : MessageAction
data class ReceiveMessagesBulkWithClear(val messages: List<UIMessage>, val toxpk: String) : MessageAction
data class ReceiveMessage(val message: UIMessage) : MessageAction
Expand All @@ -21,12 +21,14 @@ data class MessageState(var messages: SnapshotStateList<UIMessage> = mutableStat
const val maxMessages = MAX_ONE_ON_ONE_MESSAGES_TO_SHOW
fun chatReducer(state: MessageState, action: MessageAction): MessageState = when (action)
{
/*
is MessageAction.SendMessagesBulk ->
{
val m = state.messages.toList()
Log.i(com.zoffcc.applications.trifa.TAG, "MessageAction.SendMessagesBulk")
state.copy(messages = (m + action.messages).toMutableStateList())
}
*/
is MessageAction.SendMessage ->
{
// val m = state.messages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ fun CoroutineScope.createMessageStore(): MessageStore
{
channel.send(action)
}
/*
} else if (action is MessageAction.SendMessagesBulk)
{
if (contactstore.state.selectedContactPubkey == action.toxpk)
{
channel.send(action)
}
*/
} else
{
channel.send(action)
Expand Down
Loading