mirror of
https://github.com/mautrix/signal.git
synced 2026-11-09 07:39:20 -05:00
33 lines
579 B
Shell
Executable file
33 lines
579 B
Shell
Executable file
#!/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
|