enhance: user-friendly packages setup manual (#38946)

* replace #35564
* fix #36992
This commit is contained in:
wxiaoguang
2026-08-18 01:43:34 +08:00
committed by GitHub
parent 596b7f7a25
commit dea71bb8ba
16 changed files with 205 additions and 46 deletions
@@ -58,6 +58,10 @@ func TestPackageDebian(t *testing.T) {
}
aw.WriteHeader(hdr)
aw.Write(cbuf.Bytes())
// if you'd like to do some tests manually, uncomment the WriteFile line, then you will get some "deb" package files:
// OWNER= PASS= DIST= COMP= ; curl -X PUT "http://$OWNER:$PASS@localhost:3000/api/packages/$OWNER/debian/pool/$DIST/$COMP/upload" -T /tmp/gitea_test_debian_gitea_1.0.3_amd64.deb
// _ = os.WriteFile("/tmp/gitea_test_debian_"+name+"_"+version+"_"+architecture+".deb", buf.Bytes(), 0o644)
return &buf
}