Watch
1
0
Fork
You've already forked mautrix-signal
0
mirror of https://github.com/mautrix/signal.git synced 2026-11-09 07:39:20 -05:00
mautrix-signal/pkg/libsignalgo/update-ffi-version.sh

33 lines
579 B
Shell
Raw Permalink Normal View History

2026-10-31 19:51:35 +02:00
#!/bin/bash
set -e
pushd libsignal
LIBSIGNAL_TAG=$(git describe --tags --always)
LIBSIGNAL_VERSION_FUNC=$(echo $LIBSIGNAL_TAG | tr -d 'v' | sed 's/\./_/g')
popd
cat > signalversion/version.go <<EOF
// Generated by update-ffi.sh; DO NOT EDIT.
package signalversion
const Version = "${LIBSIGNAL_TAG}"
EOF
cat > version.go <<EOF
// Generated by update-ffi.sh; DO NOT EDIT.
package libsignalgo
/*
#include "./libsignal-ffi.h"
*/
import "C"
func init() {
// Compile time check to ensure the libsignal version matches
C.signal_ffi_version_${LIBSIGNAL_VERSION_FUNC}()
}
EOF