├── .gitignore ├── .github └── workflows │ └── publish.yaml ├── .SRCINFO ├── README.md ├── update.sh └── PKGBUILD /.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !PKGBUILD 3 | !.SRCINFO 4 | !.gitignore 5 | !README.md 6 | !update.sh 7 | !.github 8 | -------------------------------------------------------------------------------- /.github/workflows/publish.yaml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | aur: 10 | name: Publish 11 | runs-on: ubuntu-latest 12 | timeout-minutes: 10 13 | steps: 14 | - name: Checkout repo 15 | uses: actions/checkout@v3 16 | with: 17 | fetch-depth: 0 18 | 19 | - name: Publish AUR package 20 | uses: KSXGitHub/github-actions-deploy-aur@v2.5.0 21 | with: 22 | pkgname: code-server 23 | pkgbuild: ./PKGBUILD 24 | commit_username: ${{ secrets.AUR_USERNAME }} 25 | commit_email: ${{ secrets.AUR_EMAIL }} 26 | ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} 27 | commit_message: Update AUR package 28 | ssh_keyscan_types: rsa,ecdsa,ed25519 29 | -------------------------------------------------------------------------------- /.SRCINFO: -------------------------------------------------------------------------------- 1 | pkgbase = code-server 2 | pkgdesc = VS Code in the browser 3 | pkgver = 4.106.3 4 | pkgrel = 1 5 | url = https://github.com/coder/code-server 6 | arch = x86_64 7 | arch = aarch64 8 | license = MIT 9 | depends = glibc 10 | source = code-server-4.106.3-user.service::https://raw.githubusercontent.com/cdr/code-server/v4.106.3/ci/build/code-server-user.service 11 | source = code-server-4.106.3@.service::https://raw.githubusercontent.com/cdr/code-server/v4.106.3/ci/build/code-server@.service 12 | sha512sums = 7040df09c7404a56dbbb32e09d04ead3b622773520feae19c6710656cef46ca5d79b1972bfebb931e309e495d041b9938cd6a51c39fc0f8f6133dfe711be9280 13 | sha512sums = ab8e679c05f6184f163dccf0651e8c1fac22a29ae583148f8c93b6930ece27cdff45a48b425e8b15b8c8ce749015680a3ae8225b7e8037979ff3d228f396f629 14 | source_x86_64 = https://github.com/coder/code-server/releases/download/v4.106.3/code-server-4.106.3-linux-amd64.tar.gz 15 | sha512sums_x86_64 = 35a82c3227a0e6e7b85b3c93e689cac3ec7479d65be24b1d6d67626d8705104e96b93655f385368bff07bda47d12f300a34f28e09c8f5a667679e9113e0d5d2d 16 | source_aarch64 = https://github.com/coder/code-server/releases/download/v4.106.3/code-server-4.106.3-linux-arm64.tar.gz 17 | sha512sums_aarch64 = 8afb15634577152d4b62e27b19d3abc5e3cacf6fc208a11f4bf741f2f7cc2617bfbc62ebfe1dd04736a1288024ed86eb4ba4dc5e5913357cea7ec38b1cd4cb40 18 | 19 | pkgname = code-server 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # code-server-aur 2 | 3 | Arch User Repository package for [code-server](https://github.com/cdr/code-server). 4 | Feel free to file issues here or comment on the AUR page. 5 | 6 | Previously maintained by [KSXGitHub](https://github.com/KSXGitHub) 7 | 8 | ## Updating 9 | 10 | Make sure you run these commands on an Arch machine. If you're a Coder employee, we suggest using your dogfooding environment. 11 | 12 | 1. Run `sh update.sh` and type in the new version 13 | 1. Push changes to GitHub: `git push` 14 | 1. Push changes to `aur`: `git push aur` 15 | - If you don't have this set up, run `git remote add aur ssh://aur@aur.archlinux.org/code-server.git` 16 | - Run `git push aur` 17 | 18 | ### SSH Key 19 | 20 | In order to publish updates to AUR, you'll need to have an SSH key pair setup. 21 | 22 | 1. Create a config file file `~/.ssh/config` 23 | ```text 24 | Host aur.archlinux.org 25 | IdentityFile ~/.ssh/aur 26 | User aur 27 | ``` 28 | 2. Create a new key pair by running: 29 | ```shell 30 | ssh-keygen -f ~/.ssh/aur 31 | ``` 32 | 3. This will create a new public key at `.ssh/aur.pub`. Copy this and add to your AUR account under [My Account](https://aur.archlinux.org/account/yourusername/edit/) > SSH Public Key 33 | 4. You may also need to be added by the package maintainer (@coadler) 34 | 35 | Read more: https://wiki.archlinux.org/index.php/AUR_submission_guidelines 36 | 37 | ### New Maintainers 38 | 39 | If a new maintainer joins the project, please add them to the top of `PKGBUILD`. 40 | 41 | ### Removing Old Maintainers 42 | 43 | Instead of removing them completely, change their title from "Maintainer" to "Contributor". 44 | 45 | ### Automated publishing 46 | 47 | @jsjoeio created an account under `cdrci` for automating publishing the AUR 48 | package. If you need these credentials, please ask him. 49 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Description: This is a script to update the version 3 | # Run it with `sh update.sh ` and it will do the following: 4 | # 1. Update the `pkgver` in `PKGBUILD` to the latest version 5 | # 2. Run `updpkgsums` to update the sha256 sums 6 | # - If you don't have it installed, run `sudo pacman -S pacman-contrib` 7 | # 3. Update the `.SRCINFO` by running: 8 | # ```bash 9 | # # This is the file that is used by the AUR to show package info. 10 | # makepkg --printsrcinfo > .SRCINFO 11 | # ``` 12 | # 4. Push changes to GitHub: `git push` 13 | 14 | set -euo pipefail 15 | 16 | main() { 17 | # Check that they have updpkgsums installed 18 | if ! command -v updpkgsums &>/dev/null; then 19 | echo "updpkgsums could not be found." 20 | echo "This is needed to update the sha256 sums" 21 | echo -e "Installing for you with: sudo pacman -S pacman-contrib" 22 | sudo pacman -S pacman-contrib --noconfirm 23 | fi 24 | 25 | ls 26 | grep "pkgver=" PKGBUILD 27 | CODE_SERVER_CURRENT_VERSION=$(grep "pkgver=" PKGBUILD | cut -d "=" -f2-) 28 | echo "Current version: ${CODE_SERVER_CURRENT_VERSION}" 29 | 30 | CODE_SERVER_VERSION_TO_UPDATE=${1:-""} 31 | 32 | if [ "$CODE_SERVER_VERSION_TO_UPDATE" == "" ]; then 33 | echo "Please call this script with the version to update to." 34 | echo "i.e. 4.5.2" 35 | exit 1 36 | fi 37 | 38 | echo -e "Great! We'll update to $CODE_SERVER_VERSION_TO_UPDATE\n" 39 | 40 | sed -i "s/$CODE_SERVER_CURRENT_VERSION/$CODE_SERVER_VERSION_TO_UPDATE/" PKGBUILD 41 | 42 | updpkgsums 43 | 44 | makepkg --printsrcinfo > .SRCINFO 45 | 46 | echo "All updated!" 47 | echo "Committing and pushing to GitHub" 48 | git add . 49 | git commit -m "chore: updating version $CODE_SERVER_VERSION_TO_UPDATE" 50 | git push 51 | echo "Action requried: make sure to push to aur: git push aur" 52 | } 53 | 54 | main "$@" 55 | -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Colin Adler 2 | # Maintainer: Asher 3 | # Maintainer: cdrci 4 | # Contributor: Joe Previte 5 | # Contributor: Teffen Ellis 6 | # Contributor: Anmol 7 | 8 | pkgname=code-server 9 | pkgver=4.106.3 10 | pkgrel=1 11 | pkgdesc="VS Code in the browser" 12 | arch=("x86_64" "aarch64") 13 | url="https://github.com/coder/code-server" 14 | license=(MIT) 15 | depends=(glibc) 16 | source=( 17 | "$pkgname-$pkgver-user.service::https://raw.githubusercontent.com/cdr/code-server/v$pkgver/ci/build/code-server-user.service" 18 | "$pkgname-$pkgver@.service::https://raw.githubusercontent.com/cdr/code-server/v$pkgver/ci/build/code-server@.service" 19 | ) 20 | release_name="code-server-${pkgver}-linux" 21 | source_x86_64=( 22 | "${url}/releases/download/v$pkgver/$release_name-amd64.tar.gz" 23 | ) 24 | source_aarch64=( 25 | "${url}/releases/download/v$pkgver/$release_name-arm64.tar.gz" 26 | ) 27 | sha512sums=('7040df09c7404a56dbbb32e09d04ead3b622773520feae19c6710656cef46ca5d79b1972bfebb931e309e495d041b9938cd6a51c39fc0f8f6133dfe711be9280' 28 | 'ab8e679c05f6184f163dccf0651e8c1fac22a29ae583148f8c93b6930ece27cdff45a48b425e8b15b8c8ce749015680a3ae8225b7e8037979ff3d228f396f629') 29 | sha512sums_x86_64=('35a82c3227a0e6e7b85b3c93e689cac3ec7479d65be24b1d6d67626d8705104e96b93655f385368bff07bda47d12f300a34f28e09c8f5a667679e9113e0d5d2d') 30 | sha512sums_aarch64=('8afb15634577152d4b62e27b19d3abc5e3cacf6fc208a11f4bf741f2f7cc2617bfbc62ebfe1dd04736a1288024ed86eb4ba4dc5e5913357cea7ec38b1cd4cb40') 31 | package() { 32 | if [[ ${CARCH} == x86_64 ]]; then 33 | release_name+=-amd64 34 | else 35 | release_name+=-arm64 36 | fi 37 | 38 | mkdir -p "$pkgdir/usr/lib" 39 | cp -a "$release_name" "$pkgdir/usr/lib/$pkgname" 40 | 41 | mkdir -p "$pkgdir/usr/bin" 42 | ln -s "/usr/lib/$pkgname/bin/$pkgname" "$pkgdir/usr/bin/$pkgname" 43 | 44 | mkdir -p "$pkgdir/usr/lib/systemd/system" 45 | cp -aL "$pkgname-$pkgver@.service" "$pkgdir/usr/lib/systemd/system/$pkgname@.service" 46 | 47 | mkdir -p "$pkgdir/usr/lib/systemd/user" 48 | cp -aL "$pkgname-$pkgver-user.service" "$pkgdir/usr/lib/systemd/user/$pkgname.service" 49 | 50 | mkdir -p "$pkgdir/usr/share/licenses" 51 | cp -a "$release_name/LICENSE" "$pkgdir/usr/share/licenses/$pkgname" 52 | } 53 | --------------------------------------------------------------------------------