This commit is contained in:
parent
ef4e5e3ccc
commit
11e4772f4d
6 changed files with 1157 additions and 1093 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ buildGoModule, callPackage, fetchpatch }:
|
||||
{ buildGoModule, callPackage }:
|
||||
let
|
||||
common = callPackage ./common.nix { };
|
||||
in
|
||||
|
|
@ -6,15 +6,6 @@ buildGoModule {
|
|||
pname = "woodpecker-agent";
|
||||
inherit (common) version src ldflags postInstall vendorHash;
|
||||
|
||||
patches = [
|
||||
# https://github.com/woodpecker-ci/woodpecker/pull/1686
|
||||
(fetchpatch {
|
||||
name = "fix-local-pipeline-home.patch";
|
||||
url = "https://github.com/woodpecker-ci/woodpecker/commit/d2c9b73ebf015bfa64062b9855c33e14484ccc3e.patch";
|
||||
hash = "sha256-1wYe4+oCWiV/6W4cIbdDT+mEL9ETQmcYQZhjJASvmUk=";
|
||||
})
|
||||
];
|
||||
|
||||
subPackages = "cmd/agent";
|
||||
|
||||
CGO_ENABLED = 0;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
{ lib, fetchFromGitHub }:
|
||||
let
|
||||
rev = "e7ca28026bc4576b2dd30aa2ab71c2d07dfc7197";
|
||||
srcHash = "sha256-vtttb+tRi3uDFn8liFgZcAqWLENfpTY7lWsNCoTFzEM=";
|
||||
vendorHash = "sha256-u7HT8+LeqS7mCNbUhrvSW0xd/uduL2Kw7A0mUUpW2w4=";
|
||||
yarnHash = "sha256-h+he2VxvZlStIoLb1PPxqKSmTfFNGgJmUXptjtc5xD8=";
|
||||
version = "next-${lib.substring 0 8 rev}";
|
||||
version = "1.0.0";
|
||||
srcHash = "sha256-1HSSHR3myn1x75kO/70w1p21a7dHwFiC7iAH/KRoYsE=";
|
||||
vendorHash = "sha256-UFTK3EK8eYB3/iKxycCIkSHdLsKGnDkYCpoFJSajm5M=";
|
||||
yarnHash = "sha256-QNeQwWU36A05zaARWmqEOhfyZRW68OgF4wTonQLYQfs=";
|
||||
in
|
||||
{
|
||||
inherit version yarnHash vendorHash;
|
||||
|
|
@ -12,7 +11,7 @@ in
|
|||
src = fetchFromGitHub {
|
||||
owner = "woodpecker-ci";
|
||||
repo = "woodpecker";
|
||||
inherit rev;
|
||||
rev = "v${version}";
|
||||
hash = srcHash;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
let
|
||||
common = callPackage ./common.nix { };
|
||||
|
||||
esbuild_0_17_12 = buildPackages.esbuild.overrideAttrs (_: rec {
|
||||
version = "0.17.12";
|
||||
esbuild_0_17_19 = buildPackages.esbuild.overrideAttrs (_: rec {
|
||||
version = "0.17.19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "evanw";
|
||||
repo = "esbuild";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-75qDQWAp6cmuXtq90oIIQCj5IKUoQxNARxhFo2Sm5mk=";
|
||||
hash = "sha256-PLC7OJLSOiDq4OjvrdfCawZPfbfuZix4Waopzrj8qsU=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
|
||||
|
|
@ -29,7 +29,7 @@ mkYarnPackage {
|
|||
hash = common.yarnHash;
|
||||
};
|
||||
|
||||
ESBUILD_BINARY_PATH = lib.getExe esbuild_0_17_12;
|
||||
ESBUILD_BINARY_PATH = lib.getExe esbuild_0_17_19;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
|
|
|||
|
|
@ -16,22 +16,25 @@ fi
|
|||
set -x
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
rev="$1"
|
||||
version="$1"
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ -z "$rev" ]; then
|
||||
rev="$(wget -O- "${TOKEN_ARGS[@]}" "https://api.github.com/repos/woodpecker-ci/woodpecker/commits?per_page=1" | jq -r '.[0].sha')"
|
||||
if [ -z "$version" ]; then
|
||||
version="$(wget -O- "${TOKEN_ARGS[@]}" "https://api.github.com/repos/woodpecker-ci/woodpecker/releases?per_page=1" | jq -r '.[0].tag_name')"
|
||||
fi
|
||||
|
||||
# strip leading "v"
|
||||
version="${version#v}"
|
||||
|
||||
# Woodpecker repository
|
||||
src_hash=$(nix-prefetch-github woodpecker-ci woodpecker --rev "${rev}" | jq -r .sha256)
|
||||
src_hash=$(nix-prefetch-github woodpecker-ci woodpecker --rev "v${version}" | jq -r .hash)
|
||||
|
||||
# Go modules
|
||||
mod_hash=$(nix-prefetch '{ sha256 }: (callPackage (import ./cli.nix) { }).go-modules.overrideAttrs (_: { modHash = sha256; })')
|
||||
vendorHash=$(nix-prefetch '{ sha256 }: (callPackage (import ./cli.nix) { }).goModules.overrideAttrs (_: { modHash = sha256; })')
|
||||
|
||||
# Front-end dependencies
|
||||
woodpecker_src="https://raw.githubusercontent.com/woodpecker-ci/woodpecker/$rev"
|
||||
woodpecker_src="https://raw.githubusercontent.com/woodpecker-ci/woodpecker/v$version"
|
||||
wget "${TOKEN_ARGS[@]}" "$woodpecker_src/web/package.json" -O woodpecker-package.json
|
||||
|
||||
trap 'rm -rf pnpm-lock.yaml' EXIT
|
||||
|
|
@ -41,10 +44,10 @@ yarn_hash=$(prefetch-yarn-deps yarn.lock)
|
|||
|
||||
# Use friendlier hashes
|
||||
src_hash=$(nix hash to-sri --type sha256 "$src_hash")
|
||||
mod_hash=$(nix hash to-sri --type sha256 "$mod_hash")
|
||||
vendorHash=$(nix hash to-sri --type sha256 "$vendorHash")
|
||||
yarn_hash=$(nix hash to-sri --type sha256 "$yarn_hash")
|
||||
|
||||
sed -i -E -e "s#rev = \".*\"#rev = \"$rev\"#" common.nix
|
||||
sed -i -E -e "s#version = \".*\"#version = \"$version\"#" common.nix
|
||||
sed -i -E -e "s#srcHash = \".*\"#srcHash = \"$src_hash\"#" common.nix
|
||||
sed -i -E -e "s#modHash = \".*\"#modHash = \"$mod_hash\"#" common.nix
|
||||
sed -i -E -e "s#vendorHash = \".*\"#vendorHash = \"$vendorHash\"#" common.nix
|
||||
sed -i -E -e "s#yarnHash = \".*\"#yarnHash = \"$yarn_hash\"#" common.nix
|
||||
|
|
|
|||
|
|
@ -17,55 +17,60 @@
|
|||
"test": "echo 'No tests configured' && exit 0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@intlify/unplugin-vue-i18n": "^0.9.2",
|
||||
"@kyvg/vue3-notification": "^2.9.0",
|
||||
"@intlify/unplugin-vue-i18n": "^0.10.1",
|
||||
"@kyvg/vue3-notification": "^2.9.1",
|
||||
"@vueuse/core": "^9.13.0",
|
||||
"ansi_up": "^5.1.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"floating-vue": "^2.0.0-beta.20",
|
||||
"ansi_up": "^5.2.1",
|
||||
"dayjs": "^1.11.9",
|
||||
"floating-vue": "^2.0.0-beta.24",
|
||||
"fuse.js": "^6.6.2",
|
||||
"humanize-duration": "^3.28.0",
|
||||
"javascript-time-ago": "^2.5.9",
|
||||
"lodash": "^4.17.21",
|
||||
"node-emoji": "^1.11.0",
|
||||
"pinia": "^2.0.33",
|
||||
"pinia": "^2.1.4",
|
||||
"prismjs": "^1.29.0",
|
||||
"vue": "^3.2.47",
|
||||
"vue": "^3.3.4",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-router": "^4.1.6"
|
||||
"vue-router": "^4.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/json": "^2.2.36",
|
||||
"@iconify/json": "^2.2.85",
|
||||
"@types/humanize-duration": "^3.27.1",
|
||||
"@types/javascript-time-ago": "^2.0.3",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/node": "^18.15.3",
|
||||
"@types/lodash": "^4.14.195",
|
||||
"@types/node": "^18.16.19",
|
||||
"@types/node-emoji": "^1.8.2",
|
||||
"@types/prismjs": "^1.26.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
||||
"@typescript-eslint/parser": "^5.55.0",
|
||||
"@vitejs/plugin-vue": "^4.1.0",
|
||||
"@vue/compiler-sfc": "^3.2.47",
|
||||
"eslint": "^8.36.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
||||
"@typescript-eslint/parser": "^5.60.1",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vue/compiler-sfc": "^3.3.4",
|
||||
"eslint": "^8.44.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||
"eslint-config-prettier": "^8.7.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-simple-import-sort": "^10.0.0",
|
||||
"eslint-plugin-vue": "^9.9.0",
|
||||
"eslint-plugin-vue-scoped-css": "^2.4.0",
|
||||
"prettier": "^2.8.5",
|
||||
"typescript": "5.0.2",
|
||||
"unplugin-icons": "^0.15.3",
|
||||
"eslint-plugin-vue": "^9.15.1",
|
||||
"eslint-plugin-vue-scoped-css": "^2.5.0",
|
||||
"prettier": "^2.8.8",
|
||||
"typescript": "5.0.3",
|
||||
"unplugin-icons": "^0.16.3",
|
||||
"unplugin-vue-components": "^0.24.1",
|
||||
"vite": "^4.2.0",
|
||||
"vite": "^4.3.9",
|
||||
"vite-plugin-prismjs": "^0.0.8",
|
||||
"vite-plugin-windicss": "^1.8.10",
|
||||
"vite-plugin-windicss": "^1.9.0",
|
||||
"vite-svg-loader": "^4.0.0",
|
||||
"vue-eslint-parser": "^9.1.0",
|
||||
"vue-tsc": "^1.2.0",
|
||||
"vue-eslint-parser": "^9.3.1",
|
||||
"vue-tsc": "^1.8.3",
|
||||
"windicss": "^3.5.6"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"semver@<7.5.2": ">=7.5.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue