build: rename comptime vars, add -skip-unused
This commit is contained in:
parent
b67b854b88
commit
21307c947d
@ -1,6 +1,6 @@
|
||||
FROM thevlang/vlang:latest AS builder
|
||||
COPY . .
|
||||
RUN v -prod -cc gcc -cflags -static -cflags -s -d habraview_version=$(git describe --tags) . -o /habraview
|
||||
RUN v -prod -skip-unused -cc gcc -cflags -static -cflags -s -d hv_version=$(git describe --tags) . -o /habraview
|
||||
|
||||
FROM scratch AS prod
|
||||
COPY --from=builder /habraview .
|
||||
|
2
Makefile
2
Makefile
@ -1,2 +1,2 @@
|
||||
bin:
|
||||
v -prod -cflags -static -d habraview_version=$$(git describe --tags) .
|
||||
v -prod -skip-unused -cflags -static -d hv_version=$$(git describe --tags) .
|
||||
|
@ -3,7 +3,7 @@ module habr
|
||||
import net.http
|
||||
|
||||
pub struct Habr {
|
||||
baseurl string = $d('habr_baseurl', 'https://habr.com')
|
||||
baseurl string = $d('hv_habr_baseurl', 'https://habr.com')
|
||||
}
|
||||
|
||||
pub fn Habr.new() Habr {
|
||||
|
@ -76,7 +76,7 @@ fn main() {
|
||||
name: 'habraview'
|
||||
usage: '[host][:port]'
|
||||
description: 'Habr.com posts viewer.'
|
||||
version: $d('habraview_version', '0.0.0')
|
||||
version: $d('hv_version', '0.0.0')
|
||||
defaults: struct {
|
||||
man: false
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user