mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 13:17:08 +00:00
Package tweaks
This commit is contained in:
parent
10c21552e1
commit
175a2c592e
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -37,7 +37,7 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
|
||||
|
||||
[[package]]
|
||||
name = "matrix-github"
|
||||
version = "0.0.1"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"napi",
|
||||
"napi-build",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "matrix-github"
|
||||
version = "0.0.1"
|
||||
edition = "2018"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
13
Dockerfile
13
Dockerfile
@ -6,18 +6,17 @@ FROM node:16 AS builder
|
||||
COPY . /src
|
||||
WORKDIR /src
|
||||
|
||||
RUN apt update && apt install -y rustc cargo git
|
||||
# RUN rustup-init -y --target x86_64-unknown-linux-gnu
|
||||
# We need rustup so we have a sensible rust version, the version packed with bullsye is too old
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --target x86_64-unknown-linux-gnu
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
|
||||
|
||||
# will also build
|
||||
# Workaround: Need to install esbuild manually https://github.com/evanw/esbuild/issues/462#issuecomment-771328459
|
||||
RUN yarn --ignore-scripts
|
||||
# Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=998232#10
|
||||
RUN CARGO_NET_GIT_FETCH_WITH_CLI=true yarn build:app:rs --target x86_64-unknown-linux-gnu
|
||||
RUN node node_modules/esbuild/install.js
|
||||
RUN yarn build
|
||||
|
||||
# Stage 1: The actual container
|
||||
FROM node:16-alpine
|
||||
FROM node:16
|
||||
|
||||
COPY --from=builder /src/lib/ /bin/matrix-github/
|
||||
COPY --from=builder /src/public/ /bin/matrix-github/public/
|
||||
|
@ -16,9 +16,9 @@ To set up the bridge, simply clone this repository.
|
||||
|
||||
then you will need to install the dependencies
|
||||
|
||||
```bash
|
||||
```sh
|
||||
cd matrix-github
|
||||
yarn # Or "yarn"
|
||||
yarn
|
||||
```
|
||||
|
||||
Then you will need to copy the `config.sample.yml` to a new file called `config.yml`. You should fill this in. Pay **close** attention to settings like `passkey` which are required for the bridge to function.
|
||||
|
@ -10,6 +10,9 @@
|
||||
"napi": {
|
||||
"name": "matrix-github-rs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"build:web": "snowpack build",
|
||||
"build:app": "tsc --project tsconfig.json",
|
||||
@ -73,7 +76,7 @@
|
||||
"eslint": "^7.24.0",
|
||||
"mini.css": "^3.0.1",
|
||||
"preact": "^10.5.13",
|
||||
"snowpack": "^3.2.2",
|
||||
"snowpack": "^3.8.8",
|
||||
"tailwind": "^4.0.0",
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "^4.2.4"
|
||||
|
@ -2,7 +2,14 @@
|
||||
import { JiraIssue } from "./Jira/Types";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const rootModule = require('../lib/matrix-github-rs.node');
|
||||
let rootModule;
|
||||
try {
|
||||
// In production, we expect it co-located
|
||||
rootModule = require('./matrix-github-rs.node');
|
||||
} catch (ex) {
|
||||
// When running under ts-node, it may not be co-located.
|
||||
rootModule = require('../lib/matrix-github-rs.node');
|
||||
}
|
||||
|
||||
interface FormatUtil {
|
||||
get_partial_body_for_jira_issue: (issue: JiraIssue) => Record<string, unknown>
|
||||
|
Loading…
x
Reference in New Issue
Block a user