Compare commits

...

3 Commits

Author SHA1 Message Date
d041deec68 Better logical layout for app ls -S
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2023-11-09 11:14:20 -08:00
3939971d82 Fix ls -S to deal with broken/unparsable app versions more correctly
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2023-11-09 10:50:40 -08:00
1d098eed0e Preliminary makefile support for building inside docker
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2023-11-09 10:49:15 -08:00
3 changed files with 39 additions and 12 deletions

View File

@ -30,6 +30,11 @@ build-kadabra:
build: build-abra build-kadabra
build-docker-abra:
docker run -it -v $(PWD):/abra golang:1.21 bash -c 'cd /abra; ./build-docker-inside.sh'
build-docker: build-docker-abra
clean:
@rm '$(GOPATH)/bin/abra'
@rm '$(GOPATH)/bin/kadabra'

19
build-docker-inside.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
if [ ! -f .envrc ]; then
. .envrc.sample
else
. .envrc
fi
git config --global --add safe.directory /abra # work around funky file permissions
# fixme for some reason we need to do this
go get coopcloud.tech/abra/pkg/upstream/commandconn
go get github.com/sirupsen/logrus@v1.9.3
go get github.com/cloudflare/circl/dh/x25519@v1.3.3
go get github.com/mattn/go-runewidth@v0.0.14
go get go get coopcloud.tech/abra/pkg/config
go get github.com/mattn/go-colorable@v0.1.12
go get coopcloud.tech/abra/pkg/config
#
make build

View File

@ -176,25 +176,28 @@ can take some time.
appStats.AutoUpdate = autoUpdate
var newUpdates []string
if version != "unknown" {
updates, err := recipe.GetRecipeCatalogueVersions(app.Recipe, catl)
if err != nil {
logrus.Fatal(err)
}
if (version != "unknown") {
parsedVersion, err := tagcmp.Parse(version)
if err != nil {
logrus.Fatal(err)
}
if (err != nil) {
logrus.Warning("Can't parse ", app.Recipe, " version ", version, " ", err)
} else {
updates, err := recipe.GetRecipeCatalogueVersions(app.Recipe, catl)
for _, update := range updates {
parsedUpdate, err := tagcmp.Parse(update)
if err != nil {
logrus.Fatal(err)
}
if update != version && parsedUpdate.IsGreaterThan(parsedVersion) {
newUpdates = append(newUpdates, update)
for _, update := range updates {
parsedUpdate, err := tagcmp.Parse(update)
if err != nil {
logrus.Warning("can't parse ", app.Recipe," update version ", update, " ", err)
continue
}
if update != version && parsedUpdate.IsGreaterThan(parsedVersion) {
newUpdates = append(newUpdates, update)
}
}
}
}