0.1.2-rc1
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
parent
db1f9f3ee8
commit
1a9e4c8d67
|
@ -0,0 +1,33 @@
|
|||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: golang
|
||||
commands:
|
||||
- bash release.sh cmd/configui/main.go
|
||||
|
||||
- name: gitea_release
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitea_api_key
|
||||
base_url: https://kumoly.io
|
||||
files: dist/*
|
||||
checksum:
|
||||
- sha256
|
||||
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: hub_user
|
||||
password:
|
||||
from_secret: hub_passwd
|
||||
auto_tag: true
|
||||
purge: true
|
||||
repo: tools/configui
|
||||
registry: hub.kumoly.io
|
||||
|
||||
when:
|
||||
event: tag
|
25
Makefile
25
Makefile
|
@ -29,30 +29,9 @@ web:
|
|||
build:
|
||||
go build ${LDFLAGS} -o dist/${PROJ} cmd/$(PROJ)/main.go
|
||||
|
||||
|
||||
build-unix:
|
||||
$(foreach GOOS, $(PLATFORMS), $(foreach GOARCH, $(ARCHITECTURES), $(foreach APP, $(APPS),\
|
||||
$(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); go build ${LDFLAGS} -o dist/$(APP) cmd/$(APP)/main.go) \
|
||||
$(shell cd dist; tar -czf ${APP}_$(VERSION)_$(GOOS)_$(GOARCH).tar.gz ${APP}) \
|
||||
$(shell rm dist/${APP}) \
|
||||
)))
|
||||
|
||||
build-win:
|
||||
$(foreach APP, $(APPS), \
|
||||
$(shell export GOOS=windows; export GOARCH=amd64; go build ${LDFLAGS} -o dist/${APP}.exe cmd/$(APP)/main.go) \
|
||||
$(shell cd dist; tar -czf ${APP}_$(VERSION)_windows_amd64.tar.gz ${APP}.exe) \
|
||||
$(shell rm dist/${APP}.exe) \
|
||||
)
|
||||
|
||||
build-mac-m1:
|
||||
$(foreach APP, $(APPS),\
|
||||
$(shell export GOOS=darwin; export GOARCH=arm64; go build ${LDFLAGS} -o dist/$(APP) cmd/$(APP)/main.go) \
|
||||
$(shell cd dist; tar -czf ${APP}_$(VERSION)_darwin_arm64.tar.gz ${APP}) \
|
||||
$(shell rm dist/${APP}) \
|
||||
)
|
||||
|
||||
.PHONY: binary
|
||||
binary: build-unix build-win build-mac-m1
|
||||
binary:
|
||||
bash release.sh cmd/configui/main.go
|
||||
|
||||
.PHONY: docker
|
||||
docker:
|
||||
|
|
4
app.go
4
app.go
|
@ -24,6 +24,8 @@ type Editor struct {
|
|||
|
||||
type Page struct {
|
||||
AppName string
|
||||
Version string
|
||||
Build string
|
||||
Files []ActiveFile
|
||||
Error string
|
||||
File ActiveFile
|
||||
|
@ -68,6 +70,8 @@ func (cui *ConfigUI) App(w http.ResponseWriter, r *http.Request) {
|
|||
Static: cui.NoReconfig,
|
||||
HideConfig: cui.HideConfig,
|
||||
ResultBellow: cui.ResultBellow,
|
||||
Version: version,
|
||||
Build: build,
|
||||
}
|
||||
|
||||
content := ""
|
||||
|
|
|
@ -13,6 +13,9 @@ import (
|
|||
var UNIX_SHELL = "sh"
|
||||
var WIN_SHELL = "cmd"
|
||||
|
||||
const version = "0.1.2-rc1"
|
||||
const build = "97d2e08"
|
||||
|
||||
//go:embed templates
|
||||
var tmplFS embed.FS
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,19 +1,31 @@
|
|||
VERSION=$(git describe --tags --abbrev=0)
|
||||
BUILD=$(git rev-parse --short HEAD)
|
||||
PROJ=$(basename "$(PWD)")
|
||||
PROJ=$(basename "$(pwd)")
|
||||
HUB=hub.kumoly.io
|
||||
HUB_PROJECT=tools
|
||||
LDFLAGS='-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD} -w"'
|
||||
DIST=dist
|
||||
|
||||
PLATFORMS='darwin linux'
|
||||
ARCHITECTURES=amd64
|
||||
APPS=configui
|
||||
LDFLAGS="-ldflags \"-X main.Version=${VERSION} -X main.Build=${BUILD} -w\""
|
||||
FAILURES=""
|
||||
|
||||
echo $LDFLAGS
|
||||
PLATFORMS="darwin/amd64 darwin/arm64"
|
||||
PLATFORMS="$PLATFORMS windows/amd64" # arm compilation not available for Windows
|
||||
PLATFORMS="$PLATFORMS linux/amd64"
|
||||
|
||||
build(){
|
||||
foreach GOOS $1
|
||||
echo $GOOS
|
||||
}
|
||||
|
||||
build $PLATFORMS
|
||||
for PLATFORM in $PLATFORMS; do
|
||||
GOOS=${PLATFORM%/*}
|
||||
GOARCH=${PLATFORM#*/}
|
||||
BIN_FILENAME="${PROJ}"
|
||||
if [[ "${GOOS}" == "windows" ]]; then BIN_FILENAME="${BIN_FILENAME}.exe"; fi
|
||||
CMD="GOOS=${GOOS} GOARCH=${GOARCH} go build ${LDFLAGS} -o ${DIST}/${BIN_FILENAME} $@"
|
||||
echo "${CMD}"
|
||||
eval $CMD || FAILURES="${FAILURES} ${PLATFORM}"
|
||||
sh -c "cd ${DIST} && zip ${PROJ}-${VERSION}-${GOOS}-${GOARCH}.zip ${BIN_FILENAME} && rm ${BIN_FILENAME}"
|
||||
done
|
||||
|
||||
if [[ "${FAILURES}" != "" ]]; then
|
||||
echo ""
|
||||
echo "${SCRIPT_NAME} failed on: ${FAILURES}"
|
||||
exit 1
|
||||
fi
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
|
||||
$modal-content-width: 90vw;
|
||||
$footer-padding: 0.5rem 1.5rem 0.5rem;
|
||||
|
||||
@import "../node_modules/bulma/bulma.sass";
|
||||
@import "../node_modules/@creativebulma/bulma-tooltip/src/sass/index.sass";
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{{define "base/footer"}}
|
||||
<footer class="footer">
|
||||
<div class="content has-text-right">
|
||||
<p>
|
||||
<strong>Configui</strong> {{.Version}}-{{.Build}} by <a href="https://kumoly.io/evanchen">Evan Chen</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="/public/ace/js/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="/public/ace/js/ext-beautify.js" type="text/javascript" charset="utf-8"></script>
|
||||
{{template "base/script" .}}
|
||||
|
|
Loading…
Reference in New Issue