Compare commits

..

1 Commits

Author SHA1 Message Date
Pterodactyl CI
ddabefd314 bump version for release 2022-01-23 23:39:46 +00:00
4 changed files with 8 additions and 22 deletions

View File

@@ -32,20 +32,17 @@ jobs:
go env
printf "\n\nSystem Environment:\n\n"
env
printf "Git Version: $(git version)\n\n"
echo "::set-output name=version_tag::${GITHUB_REF/refs\/tags\//}"
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
echo "::set-output name=go_cache::$(go env GOCACHE)"
echo "::set-output name=go_mod_cache::$(go env GOMODCACHE)"
- name: Build Cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-go${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
path: ${{ steps.env.outputs.go_cache }}
key: ${{ runner.os }}-${{ matrix.go }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go${{ matrix.go }}-
path: |
${{ steps.env.outputs.go_cache }}
${{ steps.env.outputs.go_mod_cache }}
${{ runner.os }}-${{ matrix.go }}-go
- name: Get Dependencies
run: |
go get -v -t -d ./...
@@ -59,10 +56,8 @@ jobs:
go build -v -trimpath -ldflags="-s -w -X ${SRC_PATH}/system.Version=dev-${GIT_COMMIT:0:7}" -o build/wings_${{ matrix.goos }}_${{ matrix.goarch }} wings.go
upx build/wings_${{ matrix.goos }}_${{ matrix.goarch }}
chmod +x build/wings_${{ matrix.goos }}_${{ matrix.goarch }}
- name: Tests
- name: Test
run: go test ./...
- name: Tests (Race)
run: go test -race ./...
- name: Upload Artifact
uses: actions/upload-artifact@v2
if: ${{ github.ref == 'refs/heads/develop' || github.event_name == 'pull_request' }}

View File

@@ -49,12 +49,10 @@ func (e *Environment) Attach(ctx context.Context) error {
if e.IsAttached() {
return nil
}
e.log().Debug("not attached to container, continuing with attach...")
if err := e.followOutput(); err != nil {
return err
}
e.log().Debug("following container output")
opts := types.ContainerAttachOptions{
Stdin: true,
@@ -64,13 +62,11 @@ func (e *Environment) Attach(ctx context.Context) error {
}
// Set the stream again with the container.
e.log().Debug("attempting to attach...")
if st, err := e.client.ContainerAttach(ctx, e.Id, opts); err != nil {
return err
} else {
e.SetStream(&st)
}
e.log().Debug("attached!")
go func() {
// Don't use the context provided to the function, that'll cause the polling to

View File

@@ -111,19 +111,14 @@ func (e *Environment) Start(ctx context.Context) error {
actx, cancel := context.WithTimeout(ctx, time.Second*30)
defer cancel()
if err := e.Attach(actx); err != nil {
return err
}
e.log().Debug("attempting to start container...")
if err := e.client.ContainerStart(actx, e.Id, types.ContainerStartOptions{}); err != nil {
return errors.WrapIf(err, "environment/docker: failed to start container")
}
e.log().Debug("started container!")
// No errors, good to continue through.
sawError = false
return nil
return e.Attach(actx)
}
// Stop stops the container that the server is running in. This will allow up to

View File

@@ -1,3 +1,3 @@
package system
var Version = "develop"
var Version = "1.5.6"