forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
croc.yaml
71 lines (60 loc) · 1.53 KB
/
croc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package:
name: croc
version: 10.1.3
epoch: 1
description: Easily and securely send things from one computer to another
copyright:
- license: MIT
dependencies:
runtime:
- ca-certificates-bundle
- git
environment:
contents:
packages:
- busybox
- ca-certificates-bundle
- go
pipeline:
- uses: git-checkout
with:
repository: https://github.com/schollz/croc
expected-commit: 65bda643515d301ba152af0cdbdcdc1f7e304291
tag: v${{package.version}}
- uses: go/bump
with:
deps: golang.org/x/[email protected]
- uses: go/build
with:
packages: .
output: croc
ldflags: -s -w
- uses: strip
update:
enabled: true
github:
identifier: schollz/croc
strip-prefix: v
test:
pipeline:
- name: Test croc version
runs: |
croc --version
croc --help
- name: Test croc send and receive
runs: |
# Set up environment variables
export CROC_SECRET="wolfi-test"
port=9009
# Start the croc relay in the background
croc relay --ports=$port &
relay_pid=$!
sleep 3
# Send a test message in the background
croc --relay=localhost:$port send --code=$CROC_SECRET --text "test message" &
send_pid=$!
sleep 3
# Receive the test message
received_message=$(croc --relay=localhost:$port --overwrite --yes $CROC_SECRET)
# Check if the received message matches the sent message
[ "$received_message" = "test message" ]