mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-19 12:36:23 -07:00
Make LICENSE a symbolic link to cmd/gochan-installer/license.txt to avoid potential build issues
This commit is contained in:
parent
8c14bf18d7
commit
7a0cbb06e3
7 changed files with 32 additions and 34 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,7 +8,6 @@
|
|||
.vagrant/
|
||||
*.log
|
||||
/templates/override
|
||||
/cmd/*/license.txt
|
||||
|
||||
# Go output
|
||||
/gochan*
|
||||
|
|
26
LICENSE
26
LICENSE
|
@ -1,26 +0,0 @@
|
|||
Copyright (c) 2025, Gochan developers
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1
LICENSE
Symbolic link
1
LICENSE
Symbolic link
|
@ -0,0 +1 @@
|
|||
./cmd/gochan-installer/license.txt
|
5
build.py
5
build.py
|
@ -270,7 +270,6 @@ def build(debugging=False, plugin_path="", static_templates=False):
|
|||
sys.exit(1)
|
||||
print("Built gochan successfully")
|
||||
|
||||
copy("LICENSE", "cmd/gochan-installer/license.txt")
|
||||
gochan_installer_build_cmd = build_cmd_base + ["-o", installer_exe, "./cmd/gochan-installer"]
|
||||
status = run_cmd(gochan_installer_build_cmd, realtime=True, print_command=True)[1]
|
||||
if status != 0:
|
||||
|
@ -288,7 +287,7 @@ def build(debugging=False, plugin_path="", static_templates=False):
|
|||
|
||||
def clean():
|
||||
print("Cleaning up")
|
||||
del_files = ("gochan", "gochan.exe", "gochan-installer", "gochan-installer.exe", "gochan-migration", "gochan-migration.exe", "releases/", "cmd/gochan/license.txt")
|
||||
del_files = ("gochan", "gochan.exe", "gochan-installer", "gochan-installer.exe", "gochan-migration", "gochan-migration.exe", "releases/")
|
||||
for del_file in del_files:
|
||||
delete(del_file)
|
||||
|
||||
|
@ -360,7 +359,7 @@ def install(prefix="/usr", document_root="/srv/gochan", symlinks=False, js_only=
|
|||
trimmed = path.relpath(file, "html/")
|
||||
os.chdir(path.join(start_dir, "html/"))
|
||||
if not quiet:
|
||||
print("copying", trimmed,"to", path.join(document_root, trimmed))
|
||||
print("copying", trimmed, "to", path.join(document_root, trimmed))
|
||||
copy(trimmed, document_root)
|
||||
os.chdir(start_dir)
|
||||
else:
|
||||
|
|
26
cmd/gochan-installer/license.txt
Normal file
26
cmd/gochan-installer/license.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
Copyright (c) 2025, Gochan developers
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -294,7 +294,7 @@ func embedMedia(post *Post) (template.HTML, error) {
|
|||
if err = embedTmpl.Execute(&buf, templateData); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return template.HTML(buf.String()), nil
|
||||
return template.HTML(buf.String()), nil // skipcq: GSC-G203
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -76,9 +76,8 @@ func GetCompleteDatabaseVersion() (dbVersion, dbFlag int, err error) {
|
|||
if isOldDesign {
|
||||
return 0, DBIsPreApril, nil
|
||||
}
|
||||
//No old or current database versioning tables found.
|
||||
// No old or current database versioning tables found.
|
||||
if config.GetSystemCriticalConfig().DBprefix != "" {
|
||||
//Check if any gochan tables exist
|
||||
gochanTableExists, err := DoesGochanPrefixTableExist()
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
|
|
|
@ -170,7 +170,7 @@ func StripHTML(htmlIn string) string {
|
|||
continue
|
||||
}
|
||||
txtContent := strings.TrimSpace(x_html.UnescapeString(string(dom.Text())))
|
||||
if len(txtContent) > 0 {
|
||||
if txtContent != "" {
|
||||
return x_html.EscapeString(txtContent)
|
||||
}
|
||||
tokenType = dom.Next()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue