mostly update comments, fix gitea releases.js

This commit is contained in:
AJ ONeal
2020-06-14 12:31:37 -06:00
parent 36b2f4010b
commit e297427e0b
6 changed files with 34 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
# homepage: https://github.com/caddyserver/caddy
# tagline: Fast, multi-platform web server with automatic HTTPS
# description: |
# Caddy is an extensible server platform that uses TLS by default.
# Caddy is an extensible server platform that uses TLS by default.
# examples: |
# ```bash
# caddy start
@@ -48,11 +48,21 @@ pkg_pre_install() {
pkg_install() {
pushd "$WEBI_TMP" 2>&1 >/dev/null
# rename the entire extracted folder to the new location
# (this will be "$HOME/.local/bin/caddy-v$WEBI_VERSION" by default)
# ensure the bin dir exists
mkdir -p "$pkg_common_bin"
# rename the entire extracted folder to the new location
# (this will be "$HOME/.local/bin/caddy", as set above)
# ex (full directory): ./node-v13-linux-amd64/bin/node.exe
#mv ./"$pkg_cmd_name"* "$pkg_new_opt"
# ex (single file): ./caddy-v2.0.0-linux-amd64.exe
mv ./"$pkg_cmd_name"* "$pkg_common_cmd"
# ex (single file, nested in directory): ./rg/rg-v13-linux-amd64
#mv ./"$pkg_cmd_name"*/"$pkg_cmd_name"* "$pkg_commend_cmd"
popd 2>&1 >/dev/null
}

View File

@@ -21,6 +21,8 @@ set -u
#
# Their defaults are defined in webi/template.bash at https://github.com/webinstall/packages
pkg_cmd_name="flutter"
pkg_get_current_version() {
# 'flutter --version' outputs a lot of information:
# Flutter 1.19.0-4.1.pre • channel beta • https://github.com/flutter/flutter.git

View File

@@ -1,16 +1,17 @@
# title: Gitea
# homepage: https://github.com/go-gitea/gitea
# tagline: Fast, multi-platform web server with automatic HTTPS
# tagline: Git with a cup of tea, painless self-hosted git service
# description: |
# Caddy is an extensible server platform that uses TLS by default.
# `gitea` is a clean, lightweight self-hosted Github alternative, forked from Gogs. Lighter and more user-friendly than Gitlab.
# examples: |
# ```bash
# gitea start
# gitea --version
# ```
set -e
set -u
pkg_cmd_name="gitea"
pkg_common_opt="$HOME/.local"
# just a junk file so that the version check always fails for non-current versions

View File

@@ -8,7 +8,7 @@ module.exports = function (request) {
return github(request, owner, repo).then(function (all) {
// remove checksums and .deb
all.releases = all.releases.filter(function (rel) {
return !/(\.asc)|(\.sha256)|(\.\d-[^\.]*)$/i.test(rel.name);
return !/(\.txt)|(\.deb)|(\.asc)|(\.sha256)$/i.test(rel.name);
});
return all;
});
@@ -16,8 +16,6 @@ module.exports = function (request) {
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
all = require('../_common/normalize.js')(all);
console.info(JSON.stringify(all));
//console.info(JSON.stringify(all, null, 2));
});
}

View File

@@ -53,7 +53,7 @@ pkg_get_current_version() {
# go version go1.14.2 darwin/amd64
# This trims it down to just the version number:
# 1.14.2
echo "$(go version | cut -d' ' -f3 | sed 's:go::')"
echo "$(go version >2/dev/null | head -n 1 | cut -d' ' -f3 | sed 's:go::')"
}
pkg_format_cmd_version() {
@@ -101,7 +101,7 @@ pkg_install() {
# rename the entire extracted folder to the new location
# (this will be "$HOME/.local/opt/go-v$WEBI_VERSION" by default)
mv ./go* "$pkg_new_opt"
mv ./"$pkg_cmd_name"* "$pkg_new_opt"
popd 2>&1 >/dev/null
}
@@ -116,6 +116,7 @@ pkg_post_install() {
webi_path_add "$GOBIN/bin"
# Install x go
echo "Installing go extended tools (goimports, gorename, etc)"
"$pkg_common_cmd" get golang.org/x/tools/cmd/goimports > /dev/null 2>/dev/null
"$pkg_common_cmd" get golang.org/x/tools/cmd/gorename > /dev/null 2>/dev/null
"$pkg_common_cmd" get golang.org/x/tools/cmd/gotype > /dev/null 2>/dev/null

View File

@@ -77,12 +77,14 @@
set -e
set -u
pkg_cmd_name="node"
pkg_get_current_version() {
# 'node --version' has output in this format:
# v12.8.0
# This trims it down to just the version number:
# 12.8.0
echo "$(node --version 2>/dev/null | sed 's:^v::')"
echo "$(node --version 2>/dev/null | head -n 1 | cut -d' ' -f1 | sed 's:^v::')"
}
pkg_format_cmd_version() {
@@ -119,8 +121,16 @@ pkg_install() {
# rename the entire extracted folder to the new location
# (this will be "$HOME/.local/opt/node-v$WEBI_VERSION" by default)
# ex (full directory): ./node-v13-linux-amd64/bin/node.exe
mv ./"$pkg_cmd_name"* "$pkg_new_opt"
# ex (single file): ./caddy-v13-linux-amd64.exe
#mv ./"$pkg_cmd_name"* "$pkg_common_cmd"
# ex (single file, nested in directory): ./rg/rg-v13-linux-amd64
#mv ./"$pkg_cmd_name"*/"$pkg_cmd_name"* "$pkg_commend_cmd"
popd 2>&1 >/dev/null
}