forked from vieter-v/vieter
Updatd config files; ran formatter
parent
5b919ceeae
commit
b90e6cf6b4
|
@ -36,22 +36,6 @@ pipeline:
|
|||
when:
|
||||
event: push
|
||||
|
||||
cli:
|
||||
image: 'chewingbever/vlang:latest'
|
||||
environment:
|
||||
- LDFLAGS=-static
|
||||
commands:
|
||||
- make cli-prod
|
||||
# Make sure the binary is actually statically built
|
||||
- readelf -d vieterctl
|
||||
- du -h vieterctl
|
||||
- '[ "$(readelf -d vieterctl | grep NEEDED | wc -l)" = 0 ]'
|
||||
# This removes so much, it's amazing
|
||||
- strip -s vieterctl
|
||||
- du -h vieterctl
|
||||
when:
|
||||
event: push
|
||||
|
||||
upload:
|
||||
image: 'chewingbever/vlang:latest'
|
||||
secrets: [ s3_username, s3_password ]
|
||||
|
@ -74,20 +58,5 @@ pipeline:
|
|||
-H "Content-Type: $CONTENT_TYPE"
|
||||
-H "Authorization: AWS $S3_USERNAME:$SIGNATURE"
|
||||
https://$URL$OBJ_PATH
|
||||
|
||||
# Also update the CLI tool
|
||||
- export OBJ_PATH="/vieter/commits/$CI_COMMIT_SHA/vieterctl-$(echo '${PLATFORM}' | sed 's:/:-:g')"
|
||||
- export SIG_STRING="PUT\n\n$CONTENT_TYPE\n$DATE\n$OBJ_PATH"
|
||||
- export SIGNATURE=`echo -en $SIG_STRING | openssl sha1 -hmac $S3_PASSWORD -binary | base64`
|
||||
- >
|
||||
curl
|
||||
--silent
|
||||
-XPUT
|
||||
-T vieterctl
|
||||
-H "Host: $URL"
|
||||
-H "Date: $DATE"
|
||||
-H "Content-Type: $CONTENT_TYPE"
|
||||
-H "Authorization: AWS $S3_USERNAME:$SIGNATURE"
|
||||
https://$URL$OBJ_PATH
|
||||
when:
|
||||
event: push
|
||||
|
|
12
Makefile
12
Makefile
|
@ -42,18 +42,6 @@ pvieter: $(SOURCES)
|
|||
c:
|
||||
$(V) -o vieter.c $(SRC_DIR)
|
||||
|
||||
# Build the CLI tool
|
||||
.PHONY: cli
|
||||
cli: dvieterctl
|
||||
dvieterctl: cli.v
|
||||
$(V_PATH) -showcc -g -o dvieterctl cli.v
|
||||
|
||||
.PHONY: cli-prod
|
||||
cli-prod: vieterctl
|
||||
vieterctl: cli.v
|
||||
cli-prod:
|
||||
$(V_PATH) -showcc -o vieterctl -prod cli.v
|
||||
|
||||
# =====EXECUTION=====
|
||||
# Run the server in the default 'data' directory
|
||||
.PHONY: run
|
||||
|
|
13
PKGBUILD
13
PKGBUILD
|
@ -1,7 +1,7 @@
|
|||
# Maintainer: Jef Roosens
|
||||
|
||||
pkgbase='vieter'
|
||||
pkgname=('vieter' 'vieterctl')
|
||||
pkgname='vieter'
|
||||
pkgver=0.1.0.rc1.r45.g6d3ff8a
|
||||
pkgrel=1
|
||||
depends=('glibc' 'openssl' 'libarchive' 'gc')
|
||||
|
@ -23,21 +23,12 @@ build() {
|
|||
# Build the compiler
|
||||
CFLAGS= make v
|
||||
|
||||
# Build the server & the CLI tool
|
||||
make prod
|
||||
make cli-prod
|
||||
}
|
||||
|
||||
package_vieter() {
|
||||
package() {
|
||||
pkgdesc="Vieter is a lightweight implementation of an Arch repository server."
|
||||
install -dm755 "$pkgdir/usr/bin"
|
||||
|
||||
install -Dm755 "$pkgbase/pvieter" "$pkgdir/usr/bin/vieter"
|
||||
}
|
||||
|
||||
package_vieterctl() {
|
||||
pkgdesc="Allows you to configure a Vieter server's list of Git repositories."
|
||||
install -dm755 "$pkgdir/usr/bin"
|
||||
|
||||
install -Dm755 "$pkgbase/vieterctl" "$pkgdir/usr/bin/vieterctl"
|
||||
}
|
||||
|
|
|
@ -14,4 +14,3 @@ pub fn cmd() cli.Command {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -91,5 +91,4 @@ pub fn load<T>() ?T {
|
|||
}
|
||||
|
||||
pub fn load_with_file<T>(path string) ?T {
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ pub fn cmd() cli.Command {
|
|||
|
||||
list(conf) ?
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,4 +37,3 @@ pub fn write_repos(path string, repos []GitRepo) ? {
|
|||
value := json.encode(repos)
|
||||
f.write_string(value) ?
|
||||
}
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ fn main() {
|
|||
description: 'Location of Vieter config file; defaults to ~/.vieterrc.'
|
||||
global: true
|
||||
default_value: [os.expand_tilde_to_home('~/.vieterrc')]
|
||||
}
|
||||
},
|
||||
]
|
||||
commands: [
|
||||
server.cmd(),
|
||||
build.cmd(),
|
||||
git.cmd()
|
||||
git.cmd(),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ pub fn cmd() cli.Command {
|
|||
execute: fn (cmd cli.Command) ? {
|
||||
conf := env.load<env.ServerConfig>() ?
|
||||
|
||||
server.server(conf) ?
|
||||
server(conf) ?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue