Skip to content

Commit

Permalink
Update to use Pelican naming
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkubi committed Apr 10, 2024
1 parent 2670051 commit f43d5c6
Show file tree
Hide file tree
Showing 88 changed files with 287 additions and 281 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Build and Push
runs-on: ubuntu-22.04
# Always run against a tag, even if the commit into the tag has [docker skip] within the commit message.
if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
if: "!contains(github.ref, 'main') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))"
steps:
- name: Code checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -62,9 +62,9 @@ jobs:
labels: ${{ steps.docker_meta.outputs.labels }}
tags: ${{ steps.docker_meta.outputs.tags }}

- name: Build and Push (develop)
- name: Build and Push (main)
uses: docker/build-push-action@v5
if: "github.event_name == 'push' && contains(github.ref, 'develop')"
if: "github.event_name == 'push' && contains(github.ref, 'main')"
with:
context: .
file: ./Dockerfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
SRC_PATH: github.com/pterodactyl/wings
SRC_PATH: github.com/pelican-dev/wings
run: |
go build -v -trimpath -ldflags="-s -w -X ${SRC_PATH}/system.Version=dev-${GIT_COMMIT:0:7}" -o dist/wings ${SRC_PATH}
go build -v -trimpath -ldflags="-X ${SRC_PATH}/system.Version=dev-${GIT_COMMIT:0:7}" -o dist/wings_debug ${SRC_PATH}
Expand All @@ -62,14 +62,14 @@ jobs:
- name: Upload Release Artifact
uses: actions/upload-artifact@v4
if: ${{ (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') && matrix.go == '1.21.8' }}
if: ${{ (github.ref == 'refs/heads/main' || github.event_name == 'pull_request') && matrix.go == '1.21.8' }}
with:
name: wings_linux_${{ matrix.goarch }}
path: dist/wings

- name: Upload Debug Artifact
uses: actions/upload-artifact@v4
if: ${{ (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') && matrix.go == '1.21.8' }}
if: ${{ (github.ref == 'refs/heads/main' || github.event_name == 'pull_request') && matrix.go == '1.21.8' }}
with:
name: wings_linux_${{ matrix.goarch }}_debug
path: dist/wings_debug
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
CGO_ENABLED: 0
REF: ${{ github.ref }}
run: |
GOARCH=amd64 go build -o dist/wings_linux_amd64 -v -trimpath -ldflags="-s -w -X github.com/pterodactyl/wings/system.Version=${REF:11}" github.com/pterodactyl/wings
GOARCH=amd64 go build -o dist/wings_linux_amd64 -v -trimpath -ldflags="-s -w -X github.com/pelican-dev/wings/system.Version=${REF:11}" github.com/pelican-dev/wings
chmod 755 dist/wings_linux_amd64
GOARCH=arm64 go build -o dist/wings_linux_arm64 -v -trimpath -ldflags="-s -w -X github.com/pterodactyl/wings/system.Version=${REF:11}" github.com/pterodactyl/wings
GOARCH=arm64 go build -o dist/wings_linux_arm64 -v -trimpath -ldflags="-s -w -X github.com/pelican-dev/wings/system.Version=${REF:11}" github.com/pelican-dev/wings
chmod 755 dist/wings_linux_arm64
- name: Extract changelog
Expand Down
18 changes: 9 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## v1.11.11
### Fixed
* Backups missing content when a `.pteroignore` file is used
* Backups missing content when a `.pelicanignore` file is used
* Archives originating from a subdirectory not containing any files ([#5030](https://github.com/pterodactyl/panel/issues/5030))

## v1.11.10
Expand Down Expand Up @@ -34,13 +34,13 @@

## v1.11.5
### Added
* Added a config option to disable Wings config.yml updates from the Panel (https://github.com/pterodactyl/wings/commit/ec6d6d83ea3eb14995c24f001233e85b37ffb87b)
* Added a config option to disable Wings config.yml updates from the Panel (https://github.com/pelican-dev/wings/commit/ec6d6d83ea3eb14995c24f001233e85b37ffb87b)

### Changed
* Wings is now built with Go 1.19.7

### Fixed
* Fixed archives containing partially matched file names (https://github.com/pterodactyl/wings/commit/43b3496f0001cec231c80af1f9a9b3417d04e8d4)
* Fixed archives containing partially matched file names (https://github.com/pelican-dev/wings/commit/43b3496f0001cec231c80af1f9a9b3417d04e8d4)

## v1.11.4
### Fixed
Expand Down Expand Up @@ -148,7 +148,7 @@

### Added
* Adds support for tracking of SFTP actions, power actions, server commands, and file uploads by utilizing a local SQLite database and processing events before sending them to the Panel.
* Adds support for configuring the MTU on the `pterodactyl0` network.
* Adds support for configuring the MTU on the `pelican0` network.

## v1.6.4
### Fixed
Expand All @@ -170,7 +170,7 @@
* CPU limit fields are only set on the Docker container if they have been specified for the server — otherwise they are left empty.

### Added
* Added the ability to define the location of the temporary folder used by Wings — defaults to `/tmp/pterodactyl`.
* Added the ability to define the location of the temporary folder used by Wings — defaults to `/tmp/pelican`.
* Adds the ability to authenticate for SFTP using public keys (requires `[email protected]`).

## v1.6.1
Expand All @@ -195,7 +195,7 @@
## v1.5.6
### Fixed
* Rewrote handler logic for the power actions lock to hopefully address issues people have been having when a server crashes and they're unable to start it again until restarting Wings.
* Fixes files uploaded with SFTP not being owned by the Pterodactyl user.
* Fixes files uploaded with SFTP not being owned by the Pelican user.
* Fixes excessive memory usage when large lines are sent through the console event handler.

### Changed
Expand Down Expand Up @@ -480,7 +480,7 @@ along though, I've only included the differences between this version and the pr
* Fixes server disk usage not being properly reported back to the API and websocket.

### Changed
* Changes diagnostics endpoint URL to be `ptero.co` rather than `hastebin.com`.
* Changes diagnostics endpoint URL to be `peli.cc` rather than `hastebin.com`.
* Diagnostics report now includes system time for easier debugging of logs and container issues.

## v1.0.0-rc.7
Expand Down Expand Up @@ -543,7 +543,7 @@ along though, I've only included the differences between this version and the pr
* Fixes some console output being written to the logs accidentally truncating other lines due to special ANSI sequences being output.
* Fixes `server.properties` files getting mangled by the automatic configuration editor when booting a server.
* Fixes a missed stream close when stopping resource polling that would lead to memory leaks.
* Fixes port bindings being incorrectly re-assigned when using `127.0.0.1` with Docker. These are now properly re-mapped to the `pterodactyl0` interface so that networking operates as expected for the server.
* Fixes port bindings being incorrectly re-assigned when using `127.0.0.1` with Docker. These are now properly re-mapped to the `pelican0` interface so that networking operates as expected for the server.
* Fixes handling of values within arrays in `yaml` and `json` configuration files.
* Fixes a 304 error being returned rather than a 400 error when a file upload is invalid.
* Fixes deadlocks and response delays when processing server console and stat events. This was causing server consoles to become completely unresponsive after random periods of time and was only resolvable via a Wings restart.
Expand Down Expand Up @@ -686,7 +686,7 @@ along though, I've only included the differences between this version and the pr

## v1.0.0-beta.5
### Fixed
* Default config location settled on `/etc/pterodactyl/config.yml`; wings will now check all of the previous locations for the configuration and move it automatically to the new location.
* Default config location settled on `/etc/pelican/config.yml`; wings will now check all of the previous locations for the configuration and move it automatically to the new location.
* Deleting a server no longer fails the process if the container cannot be found.
* Fixes permissions checking for subusers connecting to the SFTP instance.
* S3 backups now properly send back hash data to the panel.
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY go.mod go.sum /app/
RUN go mod download
COPY . /app/
RUN CGO_ENABLED=0 go build \
-ldflags="-s -w -X github.com/pterodactyl/wings/system.Version=$VERSION" \
-ldflags="-s -w -X github.com/pelican-dev/wings/system.Version=$VERSION" \
-v \
-trimpath \
-o wings \
Expand All @@ -20,6 +20,6 @@ FROM gcr.io/distroless/static:latest
COPY --from=builder /etc/os-release /etc/os-release

COPY --from=builder /app/wings /usr/bin/
CMD [ "/usr/bin/wings", "--config", "/etc/pterodactyl/config.yml" ]
CMD [ "/usr/bin/wings", "--config", "/etc/pelican/config.yml" ]

EXPOSE 8080
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ build:
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o build/wings_linux_amd64 -v wings.go
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -gcflags "all=-trimpath=$(pwd)" -o build/wings_linux_arm64 -v wings.go

test:
go test -race ./...

debug:
go build -ldflags="-X github.com/pterodactyl/wings/system.Version=$(GIT_HEAD)"
go build -ldflags="-X github.com/pelican-dev/wings/system.Version=$(GIT_HEAD)"
sudo ./wings --debug --ignore-certificate-errors --config config.yml --pprof --pprof-block-rate 1

# Runs a remotly debuggable session for Wings allowing an IDE to connect and target
# different breakpoints.
rmdebug:
go build -gcflags "all=-N -l" -ldflags="-X github.com/pterodactyl/wings/system.Version=$(GIT_HEAD)" -race
go build -gcflags "all=-N -l" -ldflags="-X github.com/pelican-dev/wings/system.Version=$(GIT_HEAD)" -race
sudo dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./wings -- --debug --ignore-certificate-errors --config config.yml

cross-build: clean build compress
Expand Down
4 changes: 2 additions & 2 deletions cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/goccy/go-json"
"github.com/spf13/cobra"

"github.com/pterodactyl/wings/config"
"github.com/pelican-dev/wings/config"
)

var configureArgs struct {
Expand Down Expand Up @@ -175,7 +175,7 @@ func getRequest() (*http.Request, error) {
return nil, err
}

r.Header.Set("Accept", "application/vnd.pterodactyl.v1+json")
r.Header.Set("Accept", "application/json")
r.Header.Set("Content-Type", "application/json")
r.Header.Set("Authorization", fmt.Sprintf("Bearer %s", configureArgs.Token))

Expand Down
14 changes: 7 additions & 7 deletions cmd/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import (
"github.com/goccy/go-json"
"github.com/spf13/cobra"

"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
"github.com/pterodactyl/wings/loggers/cli"
"github.com/pterodactyl/wings/system"
"github.com/pelican-dev/wings/config"
"github.com/pelican-dev/wings/environment"
"github.com/pelican-dev/wings/loggers/cli"
"github.com/pelican-dev/wings/system"
)

const (
DefaultHastebinUrl = "https://ptero.co"
DefaultHastebinUrl = "https://peli.cc"
DefaultLogLines = 200
)

Expand Down Expand Up @@ -94,7 +94,7 @@ func diagnosticsCmdRun(*cobra.Command, []string) {
dockerVersion, dockerInfo, dockerErr := getDockerInfo()

output := &strings.Builder{}
fmt.Fprintln(output, "Pterodactyl Wings - Diagnostics Report")
fmt.Fprintln(output, "Pelican Wings - Diagnostics Report")
printHeader(output, "Versions")
fmt.Fprintln(output, " Wings:", system.Version)
if dockerErr == nil {
Expand Down Expand Up @@ -166,7 +166,7 @@ func diagnosticsCmdRun(*cobra.Command, []string) {

printHeader(output, "Latest Wings Logs")
if diagnosticsArgs.IncludeLogs {
p := "/var/log/pterodactyl/wings.log"
p := "/var/log/pelican/wings.log"
if cfg != nil {
p = path.Join(cfg.System.LogDirectory, "wings.log")
}
Expand Down
38 changes: 19 additions & 19 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ import (
"golang.org/x/crypto/acme"
"golang.org/x/crypto/acme/autocert"

"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
"github.com/pterodactyl/wings/internal/cron"
"github.com/pterodactyl/wings/internal/database"
"github.com/pterodactyl/wings/loggers/cli"
"github.com/pterodactyl/wings/remote"
"github.com/pterodactyl/wings/router"
"github.com/pterodactyl/wings/server"
"github.com/pterodactyl/wings/sftp"
"github.com/pterodactyl/wings/system"
"github.com/pelican-dev/wings/config"
"github.com/pelican-dev/wings/environment"
"github.com/pelican-dev/wings/internal/cron"
"github.com/pelican-dev/wings/internal/database"
"github.com/pelican-dev/wings/loggers/cli"
"github.com/pelican-dev/wings/remote"
"github.com/pelican-dev/wings/router"
"github.com/pelican-dev/wings/server"
"github.com/pelican-dev/wings/sftp"
"github.com/pelican-dev/wings/system"
)

var (
Expand All @@ -45,7 +45,7 @@ var (

var rootCommand = &cobra.Command{
Use: "wings",
Short: "Runs the API server allowing programmatic control of game servers for Pterodactyl Panel.",
Short: "Runs the API server allowing programmatic control of game servers for Pelican Panel.",
PreRun: func(cmd *cobra.Command, args []string) {
initConfig()
initLogging()
Expand Down Expand Up @@ -107,11 +107,11 @@ func rootCmdRun(cmd *cobra.Command, _ []string) {
}
log.WithField("timezone", config.Get().System.Timezone).Info("configured wings with system timezone")
if err := config.ConfigureDirectories(); err != nil {
log.WithField("error", err).Fatal("failed to configure system directories for pterodactyl")
log.WithField("error", err).Fatal("failed to configure system directories for pelican")
return
}
if err := config.EnsurePterodactylUser(); err != nil {
log.WithField("error", err).Fatal("failed to create pterodactyl system user")
if err := config.EnsurePelicanUser(); err != nil {
log.WithField("error", err).Fatal("failed to create pelican system user")
}
log.WithFields(log.Fields{
"username": config.Get().System.Username,
Expand Down Expand Up @@ -422,17 +422,17 @@ func initLogging() {
func printLogo() {
fmt.Printf(colorstring.Color(`
____
__ [blue][bold]Pterodactyl[reset] _____/___/_______ _______ ______
__ [blue][bold]Pelican[reset] _____/___/_______ _______ ______
\_____\ \/\/ / / / __ / ___/
\___\ / / / / /_/ /___ /
\___/\___/___/___/___/___ /______/
/_______/ [bold]%s[reset]
Copyright © 2018 - %d Dane Everitt & Contributors
Website: https://pterodactyl.io
Source: https://github.com/pterodactyl/wings
License: https://github.com/pterodactyl/wings/blob/develop/LICENSE
Website: https://pelican.dev
Source: https://github.com/pelican-dev/wings
License: https://github.com/pelican-dev/wings/blob/develop/LICENSE
This software is made available under the terms of the MIT license.
The above copyright notice and this permission notice shall be included
Expand All @@ -447,7 +447,7 @@ Wings was not able to locate your configuration file, and therefore is not
able to complete its boot process. Please ensure you have copied your instance
configuration file into the default location below.
Default Location: /etc/pterodactyl/config.yml
Default Location: /etc/pelican/config.yml
[yellow]This is not a bug with this software. Please do not make a bug report
for this issue, it will be closed.[reset]
Expand Down
Loading

0 comments on commit f43d5c6

Please sign in to comment.