1
0
forked from x/ContextOS
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-02-21 14:24:31 +08:00
parent b0a63dd112
commit 5f9a8a1599
10 changed files with 32 additions and 53 deletions

View File

@ -4,34 +4,21 @@ binarys = bin/ice.bin
publish = usr/publish/ice.$(shell go env GOOS).$(shell go env GOARCH)
all: def
@date
@echo && date
go build -v -o ${binarys} src/main.go src/version.go src/binpack.go && ./${binarys} forever restart &>/dev/null
mkdir -p $(dir ${publish}) &>/dev/null; rm ${publish} &>/dev/null; cp ${binarys} ${publish}
def:
@ [ -f src/version.go ] || echo "package main" > src/version.go
@ [ -f src/binpack.go ] || echo "package main" > src/binpack.go
fmt:
gofmt -w usr/icebergs
goimports -w usr/icebergs
app: def
CGO_ENABLED=1 go build -v -o usr/publish/contexts.app/Contents/MacOS/contexts src/webview.go src/version.go src/binpack.go && ./${binarys} forever restart &>/dev/null
# hdiutil create usr/publish/tmp.dmg -ov -volname "ContextsInstall" -fs HFS+ -srcfolder "usr/publish/contexts.app"
# rm -f usr/publish/ContextsInstall.dmg
# hdiutil convert usr/publish/tmp.dmg -format UDZO -o usr/publish/ContextsInstall.dmg
arm:
GOOS=linux GOARCH=arm go build -o usr/publish/ice.linux.arm src/main.go src/version.go src/binpack.go
mipsle:
GOOS=linux GOARCH=mipsle go build -o usr/publish/ice.linux.mipsle src/main.go src/version.go src/binpack.go
docker:
docker image build -t $${PWD##*/} bin/
%: src/%.go
@echo && date
go build -v -o usr/publish/$@ src/$@.go && chmod u+x usr/publish/$@
go build -v -o usr/publish/$@ src/$@.go src/version.go && chmod u+x usr/publish/$@
def:
@ [ -f src/version.go ] || echo "package main" > src/version.go
@ [ -f src/binpack.go ] || echo "package main" > src/binpack.go

View File

@ -1,24 +1,23 @@
worker_processes 1;
events { worker_connections 1024; }
worker_processes 1;
events { worker_connections 1024; }
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
proxy_buffering off;
sendfile on;
proxy_buffering off;
keepalive_timeout 1800;
log_format access '[$time_local] $remote_addr'
' "$request" "$http_referer" "$http_user_agent"'
' $server_name $status $body_bytes_sent';
log_format access '[$time_local] $remote_addr "$request" "$http_referer" "$http_user_agent" $server_name $status $body_bytes_sent';
access_log logs/access.log access;
upstream contexts {
server 127.0.0.1:9020;
}
upstream contexts_repos {
server 127.0.0.1:9030;
server 127.0.0.1:9020 backup;
}
upstream contexts {
server 127.0.0.1:9020;
}
server {

View File

@ -67,3 +67,4 @@
~ssh
target web.code
source local.shy

10
go.mod
View File

@ -24,13 +24,13 @@ require (
shylinux.com/x/redis-story v0.5.8
)
require (
shylinux.com/x/gogit v0.0.7
shylinux.com/x/webview v0.0.2
)
require (
shylinux.com/x/ice v1.3.0
shylinux.com/x/icebergs v1.5.4
shylinux.com/x/toolkits v0.7.4
)
require (
shylinux.com/x/gogit v0.0.7
shylinux.com/x/webview v0.0.2
)

2
go.sum
View File

@ -4,8 +4,6 @@ shylinux.com/x/go-qrcode v0.0.2 h1:/c0PLj+1RT+kUPfnZVXwgbgH5m1SxBUjM2MIKXbDk+E=
shylinux.com/x/go-qrcode v0.0.2/go.mod h1:TlzGBENHXy19xC3AsC6h4Vs5fx2ZuDA4TZ0U3C2OeK4=
shylinux.com/x/go-sql-mysql v0.0.1 h1:VX5SrwLBKzfkRouj39LgJ9reIXOWmMsScRpr+e0qdp0=
shylinux.com/x/go-sql-mysql v0.0.1/go.mod h1:47OfAZK24HRJMy7dAu/jrksGCf9yzJaAUFwWYjhDFDA=
shylinux.com/x/go-sql-mysql v0.0.2 h1:XcsMEF3KnFmRu6EmxIwIF6M1o2tD1NQvel3U9m+1Ap4=
shylinux.com/x/go-sql-mysql v0.0.2/go.mod h1:lHjRMZz5Lii6U+49fhkbCWgsnL+yux54SYJYWqASN8Y=
shylinux.com/x/gogit v0.0.7 h1:2ep5QpXWLs0UBCywJuUHda/aagskYvFmn0nj3vpEdY4=
shylinux.com/x/gogit v0.0.7/go.mod h1:wYfHxpQT1C8yNV+yC1jStIy0I12bfUCyJARhn0sNn1M=
shylinux.com/x/golang-story v0.5.8 h1:HmP0VhtcVn/7RqMKNqstq9sLIJLGZpOGf2AphfoHJS8=

7
hi.sh
View File

@ -1,7 +0,0 @@
#! /bin/sh
export ctx_dev=http://192.168.10.8:9020 ctx_pod= ctx_mod=web.code.hi.hi
temp=$(mktemp); if curl -h &>/dev/null; then
curl -o $temp -fsSL $ctx_dev
else
wget -O $temp -q $ctx_dev
fi && source $temp $ctx_mod

View File

@ -24,13 +24,13 @@ require (
shylinux.com/x/redis-story v0.5.8
)
require (
shylinux.com/x/gogit v0.0.7
shylinux.com/x/webview v0.0.2
)
require (
shylinux.com/x/ice v1.3.0
shylinux.com/x/icebergs v1.5.4
shylinux.com/x/toolkits v0.7.4
)
require (
shylinux.com/x/gogit v0.0.7
shylinux.com/x/webview v0.0.2
)

View File

@ -4,8 +4,6 @@ shylinux.com/x/go-qrcode v0.0.2 h1:/c0PLj+1RT+kUPfnZVXwgbgH5m1SxBUjM2MIKXbDk+E=
shylinux.com/x/go-qrcode v0.0.2/go.mod h1:TlzGBENHXy19xC3AsC6h4Vs5fx2ZuDA4TZ0U3C2OeK4=
shylinux.com/x/go-sql-mysql v0.0.1 h1:VX5SrwLBKzfkRouj39LgJ9reIXOWmMsScRpr+e0qdp0=
shylinux.com/x/go-sql-mysql v0.0.1/go.mod h1:47OfAZK24HRJMy7dAu/jrksGCf9yzJaAUFwWYjhDFDA=
shylinux.com/x/go-sql-mysql v0.0.2 h1:XcsMEF3KnFmRu6EmxIwIF6M1o2tD1NQvel3U9m+1Ap4=
shylinux.com/x/go-sql-mysql v0.0.2/go.mod h1:lHjRMZz5Lii6U+49fhkbCWgsnL+yux54SYJYWqASN8Y=
shylinux.com/x/gogit v0.0.7 h1:2ep5QpXWLs0UBCywJuUHda/aagskYvFmn0nj3vpEdY4=
shylinux.com/x/gogit v0.0.7/go.mod h1:wYfHxpQT1C8yNV+yC1jStIy0I12bfUCyJARhn0sNn1M=
shylinux.com/x/golang-story v0.5.8 h1:HmP0VhtcVn/7RqMKNqstq9sLIJLGZpOGf2AphfoHJS8=

View File

@ -26,7 +26,7 @@ https://www.w3schools.com/charsets/ref_html_utf8.asp
chapter "实践"
label `
code wiki chat team mall
linux nginx "context bg red" redis mysql
linux nginx docker redis mysql
bash git golang vim tmux
` fg blue bg yellow

View File

@ -11,9 +11,12 @@ require (
)
require (
shylinux.com/x/gogit v0.0.7
shylinux.com/x/ice v1.2.9
shylinux.com/x/icebergs v1.5.3
shylinux.com/x/toolkits v0.7.4
shylinux.com/x/webview v0.0.2
)
require (
shylinux.com/x/gogit v0.0.7
shylinux.com/x/ice v1.2.9
)