forked from Kieran/snort
Try fix drone tag
This commit is contained in:
parent
6ffa314694
commit
6851fe0b2b
39
.drone.yml
39
.drone.yml
@ -101,3 +101,42 @@ volumes:
|
|||||||
- name: cache
|
- name: cache
|
||||||
claim:
|
claim:
|
||||||
name: docker-cache
|
name: docker-cache
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: docker-release
|
||||||
|
concurrency:
|
||||||
|
limit: 1
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
metadata:
|
||||||
|
namespace: git
|
||||||
|
steps:
|
||||||
|
- name: Build site
|
||||||
|
image: node:current-bullseye
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
environment:
|
||||||
|
YARN_CACHE_FOLDER: /cache/.yarn-docker-release
|
||||||
|
commands:
|
||||||
|
- yarn install
|
||||||
|
- yarn build
|
||||||
|
- name: build docker image
|
||||||
|
image: r.j3ss.co/img
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
environment:
|
||||||
|
TOKEN:
|
||||||
|
from_secret: docker_hub
|
||||||
|
commands:
|
||||||
|
- img login -u voidic -p $TOKEN
|
||||||
|
- img build -t voidic/snort:$DRONE_TAG --platform linux/amd64,linux/arm64 -f Dockerfile.prebuilt .
|
||||||
|
- img push voidic/snort:$DRONE_TAG
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
claim:
|
||||||
|
name: docker-cache
|
@ -245,22 +245,24 @@ export class ReplaceableNoteStore extends HookedNoteStore<Readonly<TaggedRawEven
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A note store that holds a single replaceable event per pubkey
|
* General use note store based on kind ranges
|
||||||
*/
|
*/
|
||||||
export class PubkeyReplaceableNoteStore extends KeyedReplaceableNoteStore {
|
export class NoteCollection extends KeyedReplaceableNoteStore {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(e => e.pubkey);
|
super((e) => {
|
||||||
}
|
const legacyReplaceable = [0, 3, 41]
|
||||||
}
|
if (e.kind >= 30_000 && e.kind < 40_000) {
|
||||||
|
return `${e.kind}:${e.pubkey}:${findTag(e, "d")}`; // Parameterized replaceable
|
||||||
/**
|
} else if (e.kind >= 10_000 && e.kind < 20_000) {
|
||||||
* A note store that holds a single replaceable event per "pubkey-dtag"
|
return `${e.kind}:${e.pubkey}`; // Replaceable event
|
||||||
*/
|
} else if (legacyReplaceable.includes(e.kind)) {
|
||||||
export class ParameterizedReplaceableNoteStore extends KeyedReplaceableNoteStore {
|
return `${e.kind}:${e.pubkey}`; // Replaceable event
|
||||||
constructor() {
|
} else {
|
||||||
super(ev => {
|
// Regular event
|
||||||
const dTag = findTag(ev, "d");
|
// ephemeral events are like regular events
|
||||||
return `${ev.pubkey}-${dTag}`;
|
// unknown kind
|
||||||
});
|
return e.id;
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user