mirror of
https://codeberg.org/scip/ephemerup.git
synced 2025-12-17 12:40:57 +01:00
moving to codeberg
This commit is contained in:
41
.github/workflows/ci.yaml
vendored
41
.github/workflows/ci.yaml
vendored
@@ -1,41 +0,0 @@
|
|||||||
name: build-and-test-ephemerup
|
|
||||||
on: [push, pull_request]
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
version: [1.18]
|
|
||||||
#os: [ubuntu-latest, windows-latest, macos-latest]
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
name: Build
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.version }}
|
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
run: make
|
|
||||||
|
|
||||||
- name: test ephemerup
|
|
||||||
run: make test
|
|
||||||
|
|
||||||
- name: test upctl
|
|
||||||
run: make -C upctl test
|
|
||||||
|
|
||||||
golangci:
|
|
||||||
name: lint
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.version }}
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: golangci-lint
|
|
||||||
uses: golangci/golangci-lint-action@v3
|
|
||||||
|
|
||||||
28
.github/workflows/pushimage.yaml
vendored
28
.github/workflows/pushimage.yaml
vendored
@@ -1,28 +0,0 @@
|
|||||||
name: build-push-image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
packages: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
|
||||||
with:
|
|
||||||
registry: https://ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
tags: ghcr.io/tlinden/ephemerup:${{ github.ref_name}}
|
|
||||||
65
.goreleaser.yaml
Normal file
65
.goreleaser.yaml
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod tidy
|
||||||
|
|
||||||
|
gitea_urls:
|
||||||
|
api: https://codeberg.org/api/v1
|
||||||
|
download: https://codeberg.org
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- freebsd
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- formats: [tar.gz]
|
||||||
|
# this name template makes the OS and Arch compatible with the results of `uname`.
|
||||||
|
name_template: >-
|
||||||
|
{{ .ProjectName }}_
|
||||||
|
{{- title .Os }}_
|
||||||
|
{{- if eq .Arch "amd64" }}x86_64
|
||||||
|
{{- else if eq .Arch "386" }}i386
|
||||||
|
{{- else }}{{ .Arch }}{{ end }}
|
||||||
|
{{- if .Arm }}v{{ .Arm }}{{ end }}_{{ .Tag }}
|
||||||
|
# use zip for windows archives
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
formats: [zip]
|
||||||
|
- goos: linux
|
||||||
|
formats: [tar.gz,binary]
|
||||||
|
files:
|
||||||
|
- src: "*.md"
|
||||||
|
strip_parent: true
|
||||||
|
- src: Makefile.dist
|
||||||
|
dst: Makefile
|
||||||
|
wrap_in_directory: true
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
sort: asc
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- "^docs:"
|
||||||
|
- "^test:"
|
||||||
|
groups:
|
||||||
|
- title: Improved
|
||||||
|
regexp: '^.*?(feat|add|new)(\([[:word:]]+\))??!?:.+$'
|
||||||
|
order: 0
|
||||||
|
- title: Fixed
|
||||||
|
regexp: '^.*?(bug|fix)(\([[:word:]]+\))??!?:.+$'
|
||||||
|
order: 1
|
||||||
|
- title: Changed
|
||||||
|
order: 999
|
||||||
|
|
||||||
|
release:
|
||||||
|
header: "# Release Notes"
|
||||||
|
footer: >-
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Full Changelog: [{{ .PreviousTag }}...{{ .Tag }}](https://codeberg.org/scip/ephemerup/compare/{{ .PreviousTag }}...{{ .Tag }})
|
||||||
36
.woodpecker/build.yaml
Normal file
36
.woodpecker/build.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- linux/amd64
|
||||||
|
goversion:
|
||||||
|
- 1.24
|
||||||
|
|
||||||
|
labels:
|
||||||
|
platform: ${platform}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
build:
|
||||||
|
when:
|
||||||
|
event: [push]
|
||||||
|
image: golang:${goversion}
|
||||||
|
commands:
|
||||||
|
- go get
|
||||||
|
- go build
|
||||||
|
|
||||||
|
linter:
|
||||||
|
when:
|
||||||
|
event: [push]
|
||||||
|
image: golang:${goversion}
|
||||||
|
commands:
|
||||||
|
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0
|
||||||
|
- golangci-lint --version
|
||||||
|
- golangci-lint run ./...
|
||||||
|
depends_on: [build]
|
||||||
|
|
||||||
|
test:
|
||||||
|
when:
|
||||||
|
event: [push]
|
||||||
|
image: golang:${goversion}
|
||||||
|
commands:
|
||||||
|
- go get
|
||||||
|
- go test -v -cover
|
||||||
|
depends_on: [build,linter]
|
||||||
32
.woodpecker/image.yaml
Normal file
32
.woodpecker/image.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# https://woodpecker-ci.org/plugins/docker-buildx
|
||||||
|
# enable Package unit and go to /scip/-/packages after building to link to proj
|
||||||
|
|
||||||
|
variables:
|
||||||
|
- &repo codeberg.org/${CI_REPO_OWNER}/ephemerup
|
||||||
|
|
||||||
|
steps:
|
||||||
|
dryrun:
|
||||||
|
image: docker.io/woodpeckerci/plugin-docker-buildx:latest
|
||||||
|
settings:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
dry_run: true
|
||||||
|
repo: *repo
|
||||||
|
tags: latest
|
||||||
|
when:
|
||||||
|
event: [pull_request]
|
||||||
|
|
||||||
|
publish:
|
||||||
|
image: docker.io/woodpeckerci/plugin-docker-buildx:latest
|
||||||
|
settings:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
repo: *repo
|
||||||
|
registry: codeberg.org
|
||||||
|
tags: latest,${CI_COMMIT_SHA:0:8},${CI_COMMIT_TAG}
|
||||||
|
username: ${CI_REPO_OWNER}
|
||||||
|
password:
|
||||||
|
from_secret: REGISTRY_TOKEN
|
||||||
|
when:
|
||||||
|
event: [tag]
|
||||||
|
branch: main
|
||||||
15
.woodpecker/release.yaml
Normal file
15
.woodpecker/release.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# build release
|
||||||
|
|
||||||
|
labels:
|
||||||
|
platform: linux/amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
goreleaser:
|
||||||
|
image: goreleaser/goreleaser
|
||||||
|
when:
|
||||||
|
event: [tag]
|
||||||
|
environment:
|
||||||
|
GITEA_TOKEN:
|
||||||
|
from_secret: DEPLOY_TOKEN
|
||||||
|
commands:
|
||||||
|
- goreleaser release --clean --verbose
|
||||||
6
Makefile
6
Makefile
@@ -45,8 +45,8 @@ buildlocalctl:
|
|||||||
make -C upctl
|
make -C upctl
|
||||||
|
|
||||||
buildlocal:
|
buildlocal:
|
||||||
# go build -ldflags "-X 'github.com/tlinden/ephemerup/cfg.VERSION=$(VERSION)'" -o $(DAEMON)
|
# go build -ldflags "-X 'codeberg.org/scip/ephemerup/cfg.VERSION=$(VERSION)'" -o $(DAEMON)
|
||||||
CGO_LDFLAGS='-static' go build -tags osusergo,netgo -ldflags "-extldflags=-static -s -X 'github.com/tlinden/ephemerup/cfg.VERSION=$(VERSION)'" -o $(DAEMON)
|
CGO_LDFLAGS='-static' go build -tags osusergo,netgo -ldflags "-extldflags=-static -s -X 'codeberg.org/scip/ephemerup/cfg.VERSION=$(VERSION)'" -o $(DAEMON)
|
||||||
|
|
||||||
buildimage: clean
|
buildimage: clean
|
||||||
docker-compose --verbose build
|
docker-compose --verbose build
|
||||||
@@ -77,7 +77,7 @@ test:
|
|||||||
|
|
||||||
singletest:
|
singletest:
|
||||||
@echo "Call like this: ''make singletest TEST=TestX1 MOD=lib"
|
@echo "Call like this: ''make singletest TEST=TestX1 MOD=lib"
|
||||||
go test -run $(TEST) github.com/tlinden/ephemerup/$(MOD)
|
go test -run $(TEST) codeberg.org/scip/ephemerup/$(MOD)
|
||||||
|
|
||||||
cover-report:
|
cover-report:
|
||||||
go test ./... -cover -coverprofile=coverage.out
|
go test ./... -cover -coverprofile=coverage.out
|
||||||
|
|||||||
18
Makefile.dist
Normal file
18
Makefile.dist
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# -*-make-*-
|
||||||
|
|
||||||
|
.PHONY: install all
|
||||||
|
|
||||||
|
tool = rpn
|
||||||
|
PREFIX = /usr/local
|
||||||
|
UID = root
|
||||||
|
GID = 0
|
||||||
|
|
||||||
|
all:
|
||||||
|
@echo "Type 'sudo make install' to install the tool."
|
||||||
|
@echo "To change prefix, type 'sudo make install PREFIX=/opt'"
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -d -o $(UID) -g $(GID) $(PREFIX)/bin
|
||||||
|
install -d -o $(UID) -g $(GID) $(PREFIX)/share/doc
|
||||||
|
install -o $(UID) -g $(GID) -m 555 $(tool) $(PREFIX)/sbin/
|
||||||
|
install -o $(UID) -g $(GID) -m 444 *.md $(PREFIX)/share/doc/
|
||||||
10
README.md
10
README.md
@@ -1,6 +1,6 @@
|
|||||||
[](https://github.com/tlinden/ephemerup/actions)
|
[](https://codeberg.org/scip/ephemerup/actions)
|
||||||
[](https://github.com/tlinden/ephemerup/blob/master/LICENSE)
|
[](https://codeberg.org/scip/ephemerup/blob/master/LICENSE)
|
||||||
[](https://goreportcard.com/report/github.com/tlinden/ephemerup)
|
[](https://goreportcard.com/report/codeberg.org/scip/ephemerup)
|
||||||
|
|
||||||
# ephemerup
|
# ephemerup
|
||||||
Simple standalone file upload server with expiration and commandline client.
|
Simple standalone file upload server with expiration and commandline client.
|
||||||
@@ -82,7 +82,7 @@ Then use the client to test it.
|
|||||||
|
|
||||||
### Install from binary package
|
### Install from binary package
|
||||||
|
|
||||||
Go to the [Releases](https://github.com/TLINDEN/ephemerup/releases)
|
Go to the [Releases](https://codeberg.org/scip/ephemerup/releases)
|
||||||
page and download the latest tarball for your platform. Unpack it and
|
page and download the latest tarball for your platform. Unpack it and
|
||||||
execute `make install` inside the created directory.
|
execute `make install` inside the created directory.
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ helm repo update
|
|||||||
helm upgrade --install ephemerup tlinden/ephemerup --namespace ephemerup --create-namespace
|
helm upgrade --install ephemerup tlinden/ephemerup --namespace ephemerup --create-namespace
|
||||||
```
|
```
|
||||||
|
|
||||||
Refer to the [chart documentation](https://github.com/TLINDEN/ephemerup/tree/main/charts/ephemerup) for help.
|
Refer to the [chart documentation](https://codeberg.org/scip/ephemerup/tree/main/charts/ephemerup) for help.
|
||||||
|
|
||||||
For starters, create a minimal `values.yaml` like this one:
|
For starters, create a minimal `values.yaml` like this one:
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/gofiber/keyauth/v2"
|
"github.com/gofiber/keyauth/v2"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// these vars can be savely global, since they don't change ever
|
// these vars can be savely global, since they don't change ever
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
//"github.com/alecthomas/repr"
|
//"github.com/alecthomas/repr"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
//"github.com/alecthomas/repr"
|
//"github.com/alecthomas/repr"
|
||||||
bolt "go.etcd.io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ package api
|
|||||||
import (
|
import (
|
||||||
//"github.com/alecthomas/repr"
|
//"github.com/alecthomas/repr"
|
||||||
"github.com/maxatome/go-testdeep/td"
|
"github.com/maxatome/go-testdeep/td"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import (
|
|||||||
"archive/zip"
|
"archive/zip"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
"io"
|
"io"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import (
|
|||||||
//"github.com/alecthomas/repr"
|
//"github.com/alecthomas/repr"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"html/template"
|
"html/template"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"net/smtp"
|
"net/smtp"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ import (
|
|||||||
"github.com/gofiber/fiber/v2/middleware/requestid"
|
"github.com/gofiber/fiber/v2/middleware/requestid"
|
||||||
"github.com/gofiber/fiber/v2/middleware/session"
|
"github.com/gofiber/fiber/v2/middleware/session"
|
||||||
"github.com/gofiber/keyauth/v2"
|
"github.com/gofiber/keyauth/v2"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// sessions are context specific and can be global savely
|
// sessions are context specific and can be global savely
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Status(c *fiber.Ctx, cfg *cfg.Config) error {
|
func Status(c *fiber.Ctx, cfg *cfg.Config) error {
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import (
|
|||||||
//"github.com/alecthomas/repr"
|
//"github.com/alecthomas/repr"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ package api
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ description: |
|
|||||||
type: application
|
type: application
|
||||||
|
|
||||||
sources:
|
sources:
|
||||||
- https://github.com/tlinden/ephemerup
|
- https://codeberg.org/scip/ephemerup
|
||||||
|
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ A Helm chart for Ephemerup.
|
|||||||
|
|
||||||
## Source Code
|
## Source Code
|
||||||
|
|
||||||
* <https://github.com/tlinden/ephemerup>
|
* <https://codeberg.org/scip/ephemerup>
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ import (
|
|||||||
flag "github.com/spf13/pflag"
|
flag "github.com/spf13/pflag"
|
||||||
|
|
||||||
"github.com/alecthomas/repr"
|
"github.com/alecthomas/repr"
|
||||||
"github.com/tlinden/ephemerup/api"
|
"codeberg.org/scip/ephemerup/api"
|
||||||
"github.com/tlinden/ephemerup/cfg"
|
"codeberg.org/scip/ephemerup/cfg"
|
||||||
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module github.com/tlinden/ephemerup/common
|
module codeberg.org/scip/ephemerup/common
|
||||||
|
|
||||||
go 1.18
|
go 1.18
|
||||||
|
|||||||
6
go.mod
6
go.mod
@@ -1,4 +1,4 @@
|
|||||||
module github.com/tlinden/ephemerup
|
module codeberg.org/scip/ephemerup
|
||||||
|
|
||||||
go 1.18
|
go 1.18
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ require (
|
|||||||
github.com/knadh/koanf/providers/posflag v0.1.0
|
github.com/knadh/koanf/providers/posflag v0.1.0
|
||||||
github.com/knadh/koanf/v2 v2.0.0
|
github.com/knadh/koanf/v2 v2.0.0
|
||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
github.com/tlinden/ephemerup/common v0.0.0-00010101000000-000000000000
|
codeberg.org/scip/ephemerup/common v0.0.0-00010101000000-000000000000
|
||||||
go.etcd.io/bbolt v1.3.7
|
go.etcd.io/bbolt v1.3.7
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -42,4 +42,4 @@ require (
|
|||||||
golang.org/x/sys v0.4.0 // indirect
|
golang.org/x/sys v0.4.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/tlinden/ephemerup/common => ./common
|
replace codeberg.org/scip/ephemerup/common => ./common
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/tlinden/ephemerup/cmd"
|
"codeberg.org/scip/ephemerup/cmd"
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
6
mkrel.sh
6
mkrel.sh
@@ -45,11 +45,11 @@ for D in $DIST; do
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
GOOS=${os} GOARCH=${arch} CGO_LDFLAGS='-static' go build -tags osusergo,netgo -ldflags \
|
GOOS=${os} GOARCH=${arch} CGO_LDFLAGS='-static' go build -tags osusergo,netgo -ldflags \
|
||||||
"-extldflags=-static -s -X 'github.com/tlinden/ephemerup/cfg.VERSION=${version}'" -o ${binfile}
|
"-extldflags=-static -s -X 'codeberg.org/scip/ephemerup/cfg.VERSION=${version}'" -o ${binfile}
|
||||||
#GOOS=${os} GOARCH=${arch} go build -o ${binfile} -ldflags "-X 'github.com/tlinden/ephemerup/cfg.VERSION=${version}'"
|
#GOOS=${os} GOARCH=${arch} go build -o ${binfile} -ldflags "-X 'codeberg.org/scip/ephemerup/cfg.VERSION=${version}'"
|
||||||
cd $client
|
cd $client
|
||||||
GOOS=${os} GOARCH=${arch} go build -o ../${clientfile} -ldflags \
|
GOOS=${os} GOARCH=${arch} go build -o ../${clientfile} -ldflags \
|
||||||
"-X 'github.com/tlinden/ephemerup/upctl/cfg.VERSION=${version}'"
|
"-X 'codeberg.org/scip/ephemerup/upctl/cfg.VERSION=${version}'"
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
mkdir -p ${tardir}
|
mkdir -p ${tardir}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ ifdef HAVE_LINT
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
buildlocal:
|
buildlocal:
|
||||||
go build -ldflags "-X 'github.com/tlinden/ephemerup/upctl/cfg.VERSION=$(VERSION)'"
|
go build -ldflags "-X 'codeberg.org/scip/ephemerup/upctl/cfg.VERSION=$(VERSION)'"
|
||||||
|
|
||||||
release:
|
release:
|
||||||
./mkrel.sh $(tool) $(version)
|
./mkrel.sh $(tool) $(version)
|
||||||
@@ -56,7 +56,7 @@ test:
|
|||||||
|
|
||||||
singletest:
|
singletest:
|
||||||
@echo "Call like this: ''make singletest TEST=TestX1 MOD=lib"
|
@echo "Call like this: ''make singletest TEST=TestX1 MOD=lib"
|
||||||
go test -run $(TEST) github.com/tlinden/upctl/$(MOD)
|
go test -run $(TEST) codeberg.org/scip/upctl/$(MOD)
|
||||||
|
|
||||||
cover-report:
|
cover-report:
|
||||||
go test ./... -cover -coverprofile=coverage.out
|
go test ./... -cover -coverprofile=coverage.out
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ import (
|
|||||||
//"errors"
|
//"errors"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
"github.com/tlinden/ephemerup/upctl/cfg"
|
"codeberg.org/scip/ephemerup/upctl/cfg"
|
||||||
"github.com/tlinden/ephemerup/upctl/lib"
|
"codeberg.org/scip/ephemerup/upctl/lib"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
"github.com/tlinden/ephemerup/upctl/cfg"
|
"codeberg.org/scip/ephemerup/upctl/cfg"
|
||||||
"github.com/tlinden/ephemerup/upctl/lib"
|
"codeberg.org/scip/ephemerup/upctl/lib"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"github.com/tlinden/ephemerup/upctl/cfg"
|
"codeberg.org/scip/ephemerup/upctl/cfg"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module github.com/tlinden/ephemerup/upctl
|
module codeberg.org/scip/ephemerup/upctl
|
||||||
|
|
||||||
go 1.18
|
go 1.18
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ require (
|
|||||||
github.com/spf13/cobra v1.6.1
|
github.com/spf13/cobra v1.6.1
|
||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
github.com/spf13/viper v1.15.0
|
github.com/spf13/viper v1.15.0
|
||||||
github.com/tlinden/ephemerup/common v0.0.0-00010101000000-000000000000
|
codeberg.org/scip/ephemerup/common v0.0.0-00010101000000-000000000000
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
@@ -51,4 +51,4 @@ require (
|
|||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/tlinden/ephemerup/common => ../common
|
replace codeberg.org/scip/ephemerup/common => ../common
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ import (
|
|||||||
"github.com/imroc/req/v3"
|
"github.com/imroc/req/v3"
|
||||||
"github.com/jarcoal/httpmock"
|
"github.com/jarcoal/httpmock"
|
||||||
"github.com/schollz/progressbar/v3"
|
"github.com/schollz/progressbar/v3"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
"github.com/tlinden/ephemerup/upctl/cfg"
|
"codeberg.org/scip/ephemerup/upctl/cfg"
|
||||||
"io"
|
"io"
|
||||||
"mime"
|
"mime"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/jarcoal/httpmock"
|
"github.com/jarcoal/httpmock"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
"github.com/tlinden/ephemerup/upctl/cfg"
|
"codeberg.org/scip/ephemerup/upctl/cfg"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import (
|
|||||||
//"github.com/alecthomas/repr"
|
//"github.com/alecthomas/repr"
|
||||||
"github.com/imroc/req/v3"
|
"github.com/imroc/req/v3"
|
||||||
"github.com/olekukonko/tablewriter"
|
"github.com/olekukonko/tablewriter"
|
||||||
"github.com/tlinden/ephemerup/common"
|
"codeberg.org/scip/ephemerup/common"
|
||||||
"io"
|
"io"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/tlinden/ephemerup/upctl/cmd"
|
"codeberg.org/scip/ephemerup/upctl/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user