4 Commits

Author SHA1 Message Date
idk
7188a28ebd Bump version 2021-12-04 01:30:18 -05:00
idk
231c9f07bd Bump version 2021-12-04 01:29:20 -05:00
idk
5abecda122 Auto-detect hostname 2021-12-04 01:28:08 -05:00
idk
48ee44606a fine-tune the release engineering 2021-12-04 00:26:36 -05:00
2 changed files with 17 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
VERSION=0.1.9 VERSION=0.2.0
APP=reseed-tools APP=reseed-tools
USER_GH=eyedeekay USER_GH=eyedeekay
@@ -41,7 +41,7 @@ install:
install -m644 etc/systemd/system/reseed.d/reseed.conf /etc/systemd/system/reseed.d/reseed.conf install -m644 etc/systemd/system/reseed.d/reseed.conf /etc/systemd/system/reseed.d/reseed.conf
install -m644 etc/systemd/system/reseed.d/reseed.service /etc/systemd/system/reseed.d/reseed.service install -m644 etc/systemd/system/reseed.d/reseed.service /etc/systemd/system/reseed.d/reseed.service
checkinstall: checkinstall: build
fakeroot checkinstall \ fakeroot checkinstall \
--default \ --default \
--install=no \ --install=no \
@@ -155,7 +155,7 @@ jar: gojava
echo $(JAVA_HOME) echo $(JAVA_HOME)
./gojava -v -o reseed.jar -s . build ./reseed ./gojava -v -o reseed.jar -s . build ./reseed
release: plugins version upload upload-bin upload-plugins upload-single-deb release: version upload checkinstall upload-single-deb binary upload-bin plguins upload-plugins
version: version:
cat README.md | gothub release -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -d - cat README.md | gothub release -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -d -
@@ -163,8 +163,8 @@ version:
edit: edit:
cat README.md | gothub edit -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -d - cat README.md | gothub edit -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -d -
upload: binary tar upload: tar
gothub upload -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f ../reseed-tools.tar.xz -n "reseed-tools.tar.xz" gothub upload -R -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f ../reseed-tools.tar.xz -n "reseed-tools.tar.xz"
binary: binary:
GOOS=darwin GOARCH=amd64 make build GOOS=darwin GOARCH=amd64 make build
@@ -219,13 +219,13 @@ upload-su3s:
GOOS=windows GOARCH=386 make upload-single-su3 GOOS=windows GOARCH=386 make upload-single-su3
upload-single-deb: upload-single-deb:
gothub upload -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f reseed-tools_$(VERSION)-1_amd64.deb -l "`sha256sum reseed-tools_$(VERSION)-1_amd64.deb`" -n "reseed-tools_$(VERSION)-1_amd64.deb" gothub upload -R -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f reseed-tools_$(VERSION)-1_amd64.deb -l "`sha256sum reseed-tools_$(VERSION)-1_amd64.deb`" -n "reseed-tools_$(VERSION)-1_amd64.deb"
upload-single-bin: upload-single-bin:
gothub upload -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f reseed-tools-"$(GOOS)"-"$(GOARCH)" -l "`sha256sum reseed-tools-$(GOOS)-$(GOARCH)`" -n "reseed-tools-$(GOOS)"-"$(GOARCH)" gothub upload -R -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f reseed-tools-"$(GOOS)"-"$(GOARCH)" -l "`sha256sum reseed-tools-$(GOOS)-$(GOARCH)`" -n "reseed-tools-$(GOOS)"-"$(GOARCH)"
upload-single-su3: upload-single-su3:
gothub upload -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f reseed-tools-"$(GOOS)"-"$(GOARCH).su3" -l "`sha256sum reseed-tools-$(GOOS)-$(GOARCH).su3`" -n "reseed-tools-$(GOOS)"-"$(GOARCH).su3" gothub upload -R -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(APP) -t v$(VERSION) -f reseed-tools-"$(GOOS)"-"$(GOARCH).su3" -l "`sha256sum reseed-tools-$(GOOS)-$(GOARCH).su3`" -n "reseed-tools-$(GOOS)"-"$(GOARCH).su3"
tmp/content: tmp/content:
mkdir -p tmp mkdir -p tmp

View File

@@ -37,6 +37,14 @@ func getDefaultSigner() string {
return intentionalsigner return intentionalsigner
} }
func getHostName() string {
hostname := os.Getenv("RESEED_HOSTNAME")
if hostname == "" {
hostname, _ = os.Hostname()
}
return hostname
}
func NewReseedCommand() cli.Command { func NewReseedCommand() cli.Command {
ndb, err := getmeanetdb.WhereIstheNetDB() ndb, err := getmeanetdb.WhereIstheNetDB()
if err != nil { if err != nil {
@@ -54,6 +62,7 @@ func NewReseedCommand() cli.Command {
}, },
cli.StringFlag{ cli.StringFlag{
Name: "tlsHost", Name: "tlsHost",
Value: getHostName(),
Usage: "The public hostname used on your TLS certificate", Usage: "The public hostname used on your TLS certificate",
}, },
cli.BoolFlag{ cli.BoolFlag{