From d3c7b244f6b8722fcfe9d00aa20d77d119b5e943 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon
Date: Jun 05 2015 07:24:44 +0000
Subject: [PATCH 1/7] Add configuration keys for the upload sources feature
We need the path to the folder to know where to upload the files
We need the name of the folder to point the users to it in the UI
We need to blacklist the folder name to avoid people create a project
named as such
---
diff --git a/pagure/default_config.py b/pagure/default_config.py
index 143a7ce..6995985 100644
--- a/pagure/default_config.py
+++ b/pagure/default_config.py
@@ -89,6 +89,11 @@ GITOLITE_CONFIG = os.path.join(
'gitolite.conf'
)
+# Configuration keys to specify where the upload folder is and what is its
+# name
+UPLOAD_FOLDER = 'releases/'
+UPLOAD_FOLDER_PATH = './' + UPLOAD_FOLDER
+
# Home folder of the gitolite user -- Folder where to run gl-compile-conf from
GITOLITE_HOME = None
@@ -139,7 +144,7 @@ SHORT_LENGTH = 6
APPLICATION_ROOT = '/'
# List of blacklisted project names
-BLACKLISTED_PROJECTS = ['static', 'pv']
+BLACKLISTED_PROJECTS = ['static', 'pv', 'releases']
ACLS = {
'issue_create': 'Create a new ticket against this project',
From cda607e1de828ff06acfd710c53061fe78d537d9 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon
Date: Jun 05 2015 07:24:44 +0000
Subject: [PATCH 2/7] Add a new endpoint to upload tarballs
---
diff --git a/pagure/templates/new_release.html b/pagure/templates/new_release.html
new file mode 100644
index 0000000..01761db
--- /dev/null
+++ b/pagure/templates/new_release.html
@@ -0,0 +1,33 @@
+{% extends "repo_master.html" %}
+
+{% block title %}New release - {{ repo.name }}{% endblock %}
+{%block tag %}home{% endblock %}
+
+
+{% block repo %}
+
+
Upload a new release
+
+
+ You can upload your tarball to pagure. This tarball can be as big as
+ {{ config['MAX_CONTENT_LENGTH'] / 1024 /1024 }}MB.
+