Skip to content

Commit 9548be9

Browse files
authored
Merge branch 'master' into update-version-4.7.1
2 parents f08fa5c + 1f1f3d1 commit 9548be9

File tree

6 files changed

+44
-8
lines changed

6 files changed

+44
-8
lines changed

.SRCINFO

-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ pkgbase = code-server
1515
sha512sums_x86_64 = d4e542a894fef141a411ba9dbd5360ca5794a6464d0ce32f5a6681de3311a64e4fd3cedc31144d3ef2eae89cd6266d6db028c042e9692051da31a87a7649962c
1616
source_aarch64 = https://github.com/cdr/code-server/releases/download/v4.7.1/code-server-4.7.1-linux-arm64.tar.gz
1717
sha512sums_aarch64 = 8ac49726830168786a4eac7f3b2182af9510443cd3bc0b5760ddee0ee6ce7845fdd91cd680c95821a3dce41c9c2cdf0b7f50ab7817b6764305e262c643c9d896
18-
1918
pkgname = code-server

.github/workflows/publish.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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/[email protected]
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,dsa,ecdsa,ed25519

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
!.SRCINFO
44
!.gitignore
55
!README.md
6-
!update.sh
6+
!update.sh
7+
!.github

PKGBUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Maintainer: Colin Adler <[email protected]>
22
# Maintainer: Asher <[email protected]>
33
# Maintainer: Joe Previte <[email protected]>
4+
# Maintainer: cdrci <[email protected]>
45
# Contributor: Teffen Ellis <[email protected]>
56
# Contributor: Anmol <[email protected]>
67

@@ -27,7 +28,6 @@ sha512sums=('7040df09c7404a56dbbb32e09d04ead3b622773520feae19c6710656cef46ca5d79
2728
'ab8e679c05f6184f163dccf0651e8c1fac22a29ae583148f8c93b6930ece27cdff45a48b425e8b15b8c8ce749015680a3ae8225b7e8037979ff3d228f396f629')
2829
sha512sums_x86_64=('d4e542a894fef141a411ba9dbd5360ca5794a6464d0ce32f5a6681de3311a64e4fd3cedc31144d3ef2eae89cd6266d6db028c042e9692051da31a87a7649962c')
2930
sha512sums_aarch64=('8ac49726830168786a4eac7f3b2182af9510443cd3bc0b5760ddee0ee6ce7845fdd91cd680c95821a3dce41c9c2cdf0b7f50ab7817b6764305e262c643c9d896')
30-
3131
package() {
3232
if [[ ${CARCH} == x86_64 ]]; then
3333
release_name+=-amd64

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ If a new maintainer joins the project, please add them to the top of `PKGBUILD`.
4141
### Removing Old Maintainers
4242

4343
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.

update.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# Description: This is a script to update the version
3-
# Run it with `sh update.sh` and it will do the following:
3+
# Run it with `sh update.sh <version>` and it will do the following:
44
# 1. Update the `pkgver` in `PKGBUILD` to the latest version
55
# 2. Run `updpkgsums` to update the sha256 sums
66
# - If you don't have it installed, run `sudo pacman -S pacman-contrib`
@@ -10,7 +10,6 @@
1010
# makepkg --printsrcinfo > .SRCINFO
1111
# ```
1212
# 4. Push changes to GitHub: `git push`
13-
# If you want to perform a dry run of this script run DRY_RUN=1 yarn release:prep
1413

1514
set -euo pipefail
1615

@@ -26,11 +25,15 @@ main() {
2625
ls
2726
grep "pkgver=" PKGBUILD
2827
CODE_SERVER_CURRENT_VERSION=$(grep "pkgver=" PKGBUILD | cut -d "=" -f2-)
29-
# Ask which version we should update to
30-
# In the future, we'll automate this and determine the latest version automatically
3128
echo "Current version: ${CODE_SERVER_CURRENT_VERSION}"
3229

33-
read -r -p "What version of code-server do you want to update to?"$'\n' CODE_SERVER_VERSION_TO_UPDATE
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
3437

3538
echo -e "Great! We'll update to $CODE_SERVER_VERSION_TO_UPDATE\n"
3639

0 commit comments

Comments
 (0)