Skip to content

Commit

Permalink
Remove branch support
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhayen committed Jan 16, 2024
1 parent 57cb2a6 commit e32980d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
10 changes: 9 additions & 1 deletion files/robots.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
User-agent: *
Disallow: *
Sitemap: https://nuitka.net/sitemap.xml
Disallow: /cgi-bin/
Disallow: /gitweb
Disallow: /volatile
Disallow: /shop
Disallow: /stripe
Disallow: /deb
Disallow: /releases
Disallow: /search.html
10 changes: 0 additions & 10 deletions files/robots.txt.operational

This file was deleted.

12 changes: 3 additions & 9 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def makePlain(value):
output = ""

def extractDebVersion(path):
match = re.search(r"nuitka_(.*)_all\.deb", filename)
match = re.search(r"nuitka_(.*)_all\.deb", path)

return match.group(1)

Expand Down Expand Up @@ -288,7 +288,7 @@ def checkOBS(repo_name):

try:
candidates.append(match.group(1))
except Exception as e:
except Exception:
print("problem with line %r from '%s'" % (line, url))
raise

Expand Down Expand Up @@ -1000,13 +1000,7 @@ def runDeploymentCommand():
"rss.xml",
]

branch = subprocess.check_output("git branch --show-current".split()).strip()

if branch == b"main" and os.path.exists("output/robots.txt-operational"):
os.unlink("output/robots.txt")
os.rename("output/robots.txt.operational", "output/robots.txt")

target_dir = "/var/www/" if branch == b"main" else "/var/www-staging/"
target_dir = "/var/www/"
command = f'rsync -ravz {" ".join(f"--exclude={exclude}" for exclude in excluded)} --chown www-data:git --chmod Dg+x --delete-after output/ root@ssh.nuitka.net:{target_dir}'

my_print(command)
Expand Down

0 comments on commit e32980d

Please sign in to comment.