tangled
alpha
login
or
join now
tsiry-sandratraina.com
/
tunein-cli
6
fork
atom
Browse and listen to thousands of radio stations across the globe right from your terminal ๐ ๐ป ๐ตโจ
radio
rust
tokio
web-radio
command-line-tool
tui
6
fork
atom
overview
issues
pulls
pipelines
ci: fix release
tsiry-sandratraina.com
6 months ago
9ae2c4f8
44a49bab
+29
-12
1 changed file
expand all
collapse all
unified
split
.fluentci
src
dagger
jobs.ts
+29
-12
.fluentci/src/dagger/jobs.ts
···
61
61
"bc",
62
62
"pkg-config",
63
63
"libudev-dev",
64
64
+
"libdbus-1-dev",
64
65
])
65
66
.withExec(["mkdir", "-p", "/build/sysroot"])
66
67
.withExec([
···
68
69
"download",
69
70
"libasound2:armhf",
70
71
"libasound2-dev:armhf",
72
72
+
"libdbus-1-dev:armhf",
71
73
"libasound2:arm64",
72
74
"libasound2-dev:arm64",
75
75
+
"libdbus-1-dev:arm64",
73
76
])
74
77
.withExec([
75
78
"dpkg",
···
95
98
"libasound2_1.2.4-1.1_armhf.deb",
96
99
"/build/sysroot/",
97
100
])
101
101
+
.withExec([
102
102
+
"dpkg",
103
103
+
"-x",
104
104
+
"libdbus-1-dev_1.12.28-0+deb11u1_armhf.deb",
105
105
+
"/build/sysroot/",
106
106
+
])
107
107
+
.withExec([
108
108
+
"dpkg",
109
109
+
"-x",
110
110
+
"libdbus-1-dev_1.12.28-0+deb11u1_arm64.deb",
111
111
+
"/build/sysroot/",
112
112
+
])
98
113
.withDirectory("/app", context, { exclude })
99
114
.withWorkdir("/app")
100
115
.withMountedCache("/app/target", dag.cacheVolume("target"))
···
103
118
.withEnvVariable("RUSTFLAGS", rustflags)
104
119
.withEnvVariable(
105
120
"PKG_CONFIG_ALLOW_CROSS",
106
106
-
Deno.env.get("TARGET") !== "x86_64-unknown-linux-gnu" ? "1" : "0"
121
121
+
Deno.env.get("TARGET") !== "x86_64-unknown-linux-gnu" ? "1" : "0",
107
122
)
108
123
.withEnvVariable(
109
124
"C_INCLUDE_PATH",
110
125
Deno.env.get("TARGET") !== "x86_64-unknown-linux-gnu"
111
126
? "/build/sysroot/usr/include"
112
112
-
: "/usr/include"
127
127
+
: "/usr/include",
113
128
)
114
129
.withEnvVariable("TAG", Deno.env.get("TAG") || "latest")
115
130
.withEnvVariable(
116
131
"TARGET",
117
117
-
Deno.env.get("TARGET") || "x86_64-unknown-linux-gnu"
132
132
+
Deno.env.get("TARGET") || "x86_64-unknown-linux-gnu",
118
133
)
119
134
.withExec([
120
135
"sh",
···
142
157
]);
143
158
144
159
const exe = await ctr.file(
145
145
-
`/app/tunein_${Deno.env.get("TAG")}_${Deno.env.get("TARGET")}.tar.gz`
160
160
+
`/app/tunein_${Deno.env.get("TAG")}_${Deno.env.get("TARGET")}.tar.gz`,
146
161
);
147
162
await exe.export(
148
148
-
`./tunein_${Deno.env.get("TAG")}_${Deno.env.get("TARGET")}.tar.gz`
163
163
+
`./tunein_${Deno.env.get("TAG")}_${Deno.env.get("TARGET")}.tar.gz`,
149
164
);
150
165
151
166
const sha = await ctr.file(
152
152
-
`/app/tunein_${Deno.env.get("TAG")}_${Deno.env.get("TARGET")}.tar.gz.sha256`
167
167
+
`/app/tunein_${Deno.env.get("TAG")}_${
168
168
+
Deno.env.get("TARGET")
169
169
+
}.tar.gz.sha256`,
153
170
);
154
171
await sha.export(
155
155
-
`./tunein_${Deno.env.get("TAG")}_${Deno.env.get("TARGET")}.tar.gz.sha256`
172
172
+
`./tunein_${Deno.env.get("TAG")}_${Deno.env.get("TARGET")}.tar.gz.sha256`,
156
173
);
157
174
return ctr.stdout();
158
175
};
···
160
177
export type JobExec = (src?: string) =>
161
178
| Promise<string>
162
179
| ((
163
163
-
src?: string,
164
164
-
options?: {
165
165
-
ignore: string[];
166
166
-
}
167
167
-
) => Promise<string>);
180
180
+
src?: string,
181
181
+
options?: {
182
182
+
ignore: string[];
183
183
+
},
184
184
+
) => Promise<string>);
168
185
169
186
export const runnableJobs: Record<Job, JobExec> = {
170
187
[Job.test]: test,