diff --git a/.env b/.env index 8939db6..665f383 100644 --- a/.env +++ b/.env @@ -1,3 +1,2 @@ PROJECT=swift-codeserver -SWIFT_VERSION=5.9.2 - +SWIFT_VERSION=6.2 diff --git a/.github/workflows/feature.yaml b/.github/workflows/feature.yaml index 98f79ef..f55296f 100644 --- a/.github/workflows/feature.yaml +++ b/.github/workflows/feature.yaml @@ -5,7 +5,7 @@ on: - features/* env: - SWIFT_VERSION: 5.9.2 + SWIFT_VERSION: 6.2 jobs: build: diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index d829a03..81e8ad7 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -5,7 +5,7 @@ on: - main env: - SWIFT_VERSION: 5.9.2 + SWIFT_VERSION: 6.2 jobs: build: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 35d6f54..cae9d8e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,7 +4,7 @@ on: types: [published] env: - SWIFT_VERSION: 5.9.2 + SWIFT_VERSION: 6.2 jobs: build: diff --git a/Dockerfile b/Dockerfile index 08aa9fa..6c0904b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,24 +33,22 @@ COPY scripts/entrypoint.sh /entrypoint.sh # ---------------------------------------------------------------------------------------- ARG SWIFT_VERSION ENV SWIFT_VERSION=${SWIFT_VERSION} + +# Install Swift (Swiftly) +# ---------------------------------------------------------------------------------------- +WORKDIR /opt/swiftly +RUN curl -o /opt/swiftly/swiftly.tar.gz https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz +RUN tar zxf swiftly.tar.gz && \ + ./swiftly init --quiet-shell-followup -y && \ + ./swiftly install --use ${SWIFT_VERSION} && \ + . ~/.local/share/swiftly/env.sh && \ + hash -r \ +RUN echo 'source /root/.local/share/swiftly/env.sh' >> /root/.bashrc +RUN /root/.local/share/swiftly/bin/swift --version +RUN ln -s /root/.local/share/swiftly/bin/swift /usr/bin/swift + + WORKDIR /build -RUN echo "install..."; \ - if [ "$(arch)" = "aarch64" ]; then \ - ADD_ARCH="-$(arch)"; \ - fi; \ - echo "Arch: ${ADD_ARCH}"; \ - echo "Version: ${SWIFT_VERSION}"; \ - if [ -z ${SWIFT_VERSION+x} ]; then \ - echo "Swift version is unset."; \ - exit 1; \ - fi; \ - SWIFT_URL="https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204${ADD_ARCH}/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04${ADD_ARCH}.tar.gz"; \ - echo "Swift download from: ${SWIFT_URL}" > /swift_download.txt; \ - wget ${SWIFT_URL}; \ - tar -xvzf swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04${ADD_ARCH}.tar.gz; \ - cd swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04${ADD_ARCH}; \ - cp -rv -T ./usr/. /usr; \ - cd /; rm -rf /build/__*; ##FIXME # Install NodeJS # ---------------------------------------------------------------------------------------- @@ -85,7 +83,7 @@ RUN pip install bash_kernel; python3 -m bash_kernel.install # Setup System Preferences # ---------------------------------------------------------------------------------------- -ENV MAX_USER_INSTANCES 2048 +ENV MAX_USER_INSTANCES=2048 # Setting the startp diff --git a/README.md b/README.md index b96526e..855c064 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,9 @@ Pull the latest docker image from the registry: docker pull ghcr.io/uitsmijter/swift-codeserver:latest ``` +## Installed Version +- Swift 6.2 + ## Support For help with the codeserver please visit our [discourse](https://discourse.uitsmijter.io) server. diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 67852cf..a1300c1 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -3,7 +3,8 @@ echo "Swift Codeserver" echo "Based on coder/code-server: https://github.com/coder/code-server" echo "-----------------------------------------------------------------------------------" -echo "For Uitsmijter - Swift ${SWIFT_VERSION}" +VERSION=$(swift --version || echo ${SWIFT_VERSION}) +echo "For Uitsmijter - Swift ${VERSION}" echo "" echo "Setup system" echo ${MAX_USER_INSTANCES} > /proc/sys/fs/inotify/max_user_instances diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index c8da1ec..41dd68b 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.7' - x-shared_environment: &shared_environment SWIFT_VERSION: "${SWIFT_VERSION}" COMMAND: