diff --git a/.gitignore b/.gitignore index 94fbb8adc..9a5f01bb9 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,13 @@ coverage.all /integrations/mysql.ini /integrations/pgsql.ini /node_modules + + +# Snapcraft +snap/.snapcraft/ +parts/ +stage/ +prime/ +*.snap +*.snap-build +*_source.tar.bz2 diff --git a/docs/content/doc/features/comparison.en-us.md b/docs/content/doc/features/comparison.en-us.md new file mode 100644 index 000000000..c793bcdd4 --- /dev/null +++ b/docs/content/doc/features/comparison.en-us.md @@ -0,0 +1,611 @@ +--- +date: "2018-05-07T13:00:00+02:00" +title: "Gitea compared to other Git hosting options" +slug: "comparison" +weight: 5 +toc: true +draft: false +menu: + sidebar: + parent: "features" + name: "Comparison" + weight: 5 + identifier: "comparison" +--- + +# Gitea compared to other Git hosting options + +To help decide if Gitea is suited for your needs here is how it compares to other Git self hosted options. + +Be warned that we don't regularly check for feature changes in other products so this list can be outdated. If you find anything that needs to be updated in table below please report [issue on Github](https://github.com/go-gitea/gitea/issues). + +_Symbols used in table:_ + +* _✓ - supported_ + +* _⁄ - supported with limited functionality_ + +* _✘ - unsupported_ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureGiteaGogsGitHub EEGitLab CEGitLab EEBitBucket
Open source and free
Issue tracker
Pull/Merge requests
Squash merging
Rebase merging
Pull/Merge request inline comments
Pull/Merge request approval
Merge conflict resolution
Restrict push and merge access to certain users
Markdown support
Issues and pull/merge requests templates
Revert specific commits or a merge request
Labels
Time tracking
Multiple assignees for issues
Related issues
Confidential issues
Comment reactions
Lock Discussion
Batch issue handling
Issue Boards
Create new branches from issues
Commit graph
Web code editor
Branch manager
Create new branches
Repository topics
Repository code search
Global code search
Issue search
Global issue search
Git LFS 2.0
Integrated Git-powered wiki
Static Git-powered pages
Group Milestones
Granular user roles (Code, Issues, Wiki etc)
Cherry-picking changes
GPG Signed Commits
Reject unsigned commits
Verified Committer?
Subgroups: groups within groups
Custom Git Hooks
Repository Activity page
Deploy Tokens
Repository Tokens with write rights
Easy upgrade process
Built-in Container Registry
External git mirroring
AD / LDAP integration
Multiple LDAP / AD server support
LDAP user synchronization
OpenId Connect support?
OAuth 2.0 integration (external authorization)?
Act as OAuth 2.0 provider
Two factor authentication (2FA)
Webhook support
Mattermost/Slack integration
Discord integration
Built-in CI/CD
External CI/CD status display
Multiple database support
Multiple OS support
Low resource usage (RAM/CPU)
diff --git a/options/locale/locale_de-DE.ini b/options/locale/locale_de-DE.ini index da0c70be8..09fd77c09 100644 --- a/options/locale/locale_de-DE.ini +++ b/options/locale/locale_de-DE.ini @@ -730,11 +730,9 @@ issues.add_time_minutes=Minuten issues.cancel_tracking=Abbrechen issues.cancel_tracking_history=hat die Zeiterfassung %s abgebrochen issues.time_spent_from_all_authors=`Aufgewendete Zeit: %s` -issues.due_date=Fälligkeitsdatum issues.due_date_form_add=Fälligkeitsdatum hinzufügen issues.due_date_form_update=Fälligkeitsdatum ändern issues.due_date_form_remove=Fälligkeitsdatum löschen -issues.due_date_not_writer=Du musst mindestens Schreibrechte für dieses Repository haben, um das Fälligkeitsdatum zu ändern. issues.due_date_not_set=Kein Fälligkeitsdatum gesetzt. issues.due_date_overdue=Überfällig diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini index 52ac46574..34eddc035 100644 --- a/options/locale/locale_pt-BR.ini +++ b/options/locale/locale_pt-BR.ini @@ -741,13 +741,13 @@ issues.time_spent_total=Tempo total gasto issues.time_spent_from_all_authors=`Tempo total gasto: %s` issues.due_date=Data limite issues.invalid_due_date_format=Formato da data limite inválido, deve ser 'dd/mm/aaaa'. -issues.error_modifying_due_date=Ocorreu um erro ao modificar a data limite. -issues.error_removing_due_date=Ocorreu um erro ao remover a data limite. +issues.error_modifying_due_date=Falha ao modificar a data limite. +issues.error_removing_due_date=Falha ao remover a data limite. issues.due_date_form=dd/mm/aaaa issues.due_date_form_add=Adicionar data limite issues.due_date_form_update=Modificar data limite issues.due_date_form_remove=Remover data limite -issues.due_date_not_writer=Você precisa ter pelo menos permissão de escrita neste repositório para atualizar a data limite desta issue. +issues.due_date_not_writer=Você deve ter permissão de escrita no repositório para atualizar a data limite de uma issue. issues.due_date_not_set=Data limite não informada. issues.due_date_added=adicionou a data limite %s à %s issues.due_date_modified=modificou a data limite para %s ao invés de %s à %s diff --git a/options/locale/locale_uk-UA.ini b/options/locale/locale_uk-UA.ini index 02594119f..6f1e41eb2 100644 --- a/options/locale/locale_uk-UA.ini +++ b/options/locale/locale_uk-UA.ini @@ -161,8 +161,8 @@ remember_me=Запам'ятати мене forgot_password_title=Забув пароль forgot_password=Забули пароль? sign_up_now=Потрібен аккаунт? Зареєструватися. -confirmation_mail_sent_prompt=Новий лист для підтвердження було направлено на %s, будь ласка, перевірте вашу поштову скриньку протягом% s для завершення реєстрації. -reset_password_mail_sent_prompt=Лист для підтвердження було направлено на %s. Будь ласка, перевірте вашу поштову скриньку протягом% s для скидання пароля. +confirmation_mail_sent_prompt=Новий лист для підтвердження було відправлено на %s, будь ласка, перевірте вашу поштову скриньку протягом %s для завершення реєстрації. +reset_password_mail_sent_prompt=Лист для підтвердження було відправлено на %s. Будь ласка, перевірте вашу поштову скриньку протягом %s для скидання пароля. active_your_account=Активувати обліковий запис prohibit_login=Вхід заборонений prohibit_login_desc=Вхід для вашого профілю був заборонений, будь ласка, зв'яжіться з адміністратором сайту. @@ -230,6 +230,7 @@ email_error=` не є адресою електронної пошти.` url_error=` не є припустимою URL-Адресою.` include_error=`повинен бути текст '%s'` unknown_error=Невідома помилка: +captcha_incorrect=Код CAPTCHA неправильний. password_not_match=Паролі не співпадають. username_been_taken=Ім'я користувача вже зайнято. @@ -341,6 +342,7 @@ generate_token=Згенерувати токен delete_token=Видалити twofa_disable=Вимкнути двофакторну автентифікацію +or_enter_secret=Або введіть секрет: %s @@ -366,6 +368,7 @@ readme_helper=Виберіть шаблон README. create_repo=Створити репозиторій default_branch=Головна гілка mirror_prune=Очистити +mirror_last_synced=Остання синхронізація watchers=Спостерігачі forks=Форки pick_reaction=Залиште свою оцінку @@ -380,6 +383,7 @@ migrate.failed=Міграція не вдалася: %v mirror_from=дзеркало forked_from=форк від copy_link=Копіювати +copy_link_error=Натисніть ⌘-C або Ctrl-C, щоб скопіювати copied=Скопійовано unwatch=Не стежити watch=Слідкувати @@ -452,9 +456,9 @@ commits.newer=Новіше ext_issues=Зов. Проблеми -issues.new=Нова Проблема +issues.new=Нова проблема issues.new.labels=Мітки -issues.new.no_label=Без Мітки +issues.new.no_label=Без мітки issues.new.clear_labels=Очистити мітки issues.new.milestone=Етап issues.new.no_milestone=Етап відсутній @@ -465,7 +469,7 @@ issues.new.assignee=Виконавець issues.new.clear_assignee=Прибрати виконавеця issues.new.no_assignee=Немає виконавеця issues.no_ref=Не вказана гілка або тег -issues.create=Створити Проблему +issues.create=Створити проблему issues.new_label=Нова мітка issues.new_label_placeholder=Назва мітки issues.new_label_desc_placeholder=Опис @@ -475,6 +479,8 @@ issues.label_templates.fail_to_load_file=Не вдалося завантажи issues.add_label_at=додав(ла) мітку
%s
%s issues.add_milestone_at=`додав(ла) до %s етапу %s` issues.deleted_milestone=`(видалено)` +issues.add_assignee_at=`був призначений %s %s` +issues.remove_assignee_at=`видалили із призначених %s` issues.open_tab=%d відкрито issues.close_tab=%d закрито issues.filter_label=Мітка @@ -549,9 +555,9 @@ issues.add_time_short=Додати час issues.add_time_cancel=Відміна issues.add_time_hours=Години issues.add_time_minutes=Хвилини +issues.add_time_sum_to_small=Час не введено. issues.cancel_tracking=Відміна -issues.due_date=Дата завершення -issues.invalid_due_date_format=Некорректна дата закінчення. Повинено бути: 'yyyy-mm-dd'. +issues.due_date=Термін дії issues.due_date_form_add=Додати дату завершення issues.due_date_form_remove=Видалити дату завершення @@ -670,6 +676,8 @@ settings.admin_settings=Налаштування адміністратора settings.danger_zone=Небезпечна зона settings.new_owner_has_same_repo=Новий власник вже має репозиторій з такою назвою. Будь ласка, виберіть інше ім'я. settings.transfer=Переказати новому власнику +settings.wiki_delete=Видалити Wiki-дані +settings.confirm_wiki_delete=Видалити Wiki-дані settings.delete=Видалити цей репозиторій settings.delete_notices_1=- Цю операцію НЕ МОЖНА відмінити. settings.transfer_owner=Новий власник @@ -846,6 +854,8 @@ users.created=Створено users.edit=Редагувати users.auth_source=Джерело автентифікації users.local=Локальні +users.max_repo_creation=Максимальна кількість репозиторіїв +users.max_repo_creation_desc=(Введіть -1, щоб використовувати глобальний ліміт за замовчуванням.) orgs.org_manage_panel=Керування організаціями orgs.name=Назва @@ -1027,16 +1037,17 @@ notices.op=Оп. [action] create_repo=створено репозиторій %s rename_repo=репозиторій перейменовано з %[1]s на %[3]s -commit_repo=запушено до %[3]s у %[4]s -create_issue=`відкрито проблему %s#%[2]s` +commit_repo=виконав(ла) push в %[3]s у %[4]s +create_issue=`відкрив(ла) проблему %s#%[2]s` close_issue=`закрито проблему %s#%[2]s` -reopen_issue=`повторно відкрито проблему %s#%[2]s` +reopen_issue=`повторно відкрив(ла) проблему %s#%[2]s` create_pull_request=`створено запити на злиття %s#%[2]s` close_pull_request=`закрито запит на злиття %s#%[2]s` reopen_pull_request=`повторно відкрито запит на злиття %s#%[2]s` comment_issue=`прокоментував(ла) проблему %s#%[2]s` merge_pull_request=`запит на злиття злито %s#%[2]s` transfer_repo=перенесено репозиторій %s у %s +push_tag=створив(ла) тег %[2]s в %[3]s delete_tag=видалено мітку %[2]s з %[3]s delete_branch=видалено гілку %[2]s з %[3]s compare_commits=Порівняти %d комітів @@ -1072,6 +1083,8 @@ remove_file=Видалити файл notifications=Сповіщення unread=Непрочитані read=Прочитані +no_unread=Немає непрочитаних сповіщень. +no_read=Немає прочитаних сповіщень. pin=Прикріпити сповіщення mark_as_read=Позначити як прочитане mark_as_unread=Позначити як непрочитане diff --git a/snap/helpers/app.ini b/snap/helpers/app.ini new file mode 100644 index 000000000..dd7fa3c88 --- /dev/null +++ b/snap/helpers/app.ini @@ -0,0 +1,66 @@ +APP_NAME = Gitea: Go Git Service +RUN_USER = root +RUN_MODE = prod +CUSTOM_PATH = SNAP_DIR_DATA/custom + +[server] +DOMAIN = localhost +PROTOCOL = http +HTTP_PORT = 3001 +ROOT_URL = http://localhost:3001/ +DISABLE_SSH = false +SSH_PORT = 22 +STATIC_ROOT_PATH = SNAP_DIR_DATA/static +APP_DATA_PATH = SNAP_DIR_COMMON/data +SSH_ROOT = SNAP_DIR_COMMON/ssh +SSH_KEY_TEST_PATH = SNAP_DIR_DATA/sshkeytest + +[database] +DB_TYPE = sqlite3 +PATH = SNAP_DIR_COMMON/gitea.db + +[repository] +ROOT = SNAP_DIR_COMMON/repositories/data + +[repository.upload] +ENABLED = true +ALLOWED_TYPES = "image/jpeg|image/png" +FILE_MAX_SIZE = 10 +MAX_FILES = 5 +TEMP_PATH = SNAP_DIR_COMMON/repositories/tmp + +[release.attachment] +PATH = SNAP_DIR_COMMON/releases/attachments + +[smartypants] +ENABLED = true + +[indexer] +ISSUE_INDEXER_PATH = SNAP_DIR_COMMON/indexers/issues.bleve + + +[mailer] +ENABLED = false + +[service] +REGISTER_EMAIL_CONFIRM = false +ENABLE_NOTIFY_MAIL = false +DISABLE_REGISTRATION = false +ENABLE_CAPTCHA = false +REQUIRE_SIGNIN_VIEW = false + +[picture] +AVATAR_UPLOAD_PATH = SNAP_DIR_COMMON/pictures/avatars +DISABLE_GRAVATAR = true +ENABLE_FEDERATED_AVATAR = false + +[attachment] +PATH = SNAP_DIR_COMMON/attachments + +[session] +PROVIDER = memory + +[log] +MODE = file +LEVEL = Trace +ROOT_PATH = SNAP_DIR_COMMON/log diff --git a/snap/helpers/configuration.sh b/snap/helpers/configuration.sh new file mode 100755 index 000000000..34b7fc7af --- /dev/null +++ b/snap/helpers/configuration.sh @@ -0,0 +1,126 @@ +#!/bin/bash +if snapctl get gitea.snap.custom; then + cdir=$(snapctl get gitea.snap.custom) +else + cdir=$SNAP_COMMON +fi + +cfg="$cdir/conf/app.ini" +bak="$cdir/conf/app.ini.bak-$(date -Ins)" +basecfg="$SNAP/snap/helpers/app.ini" +smp="$SNAP/gitea/custom/conf/app.ini.sample" + +function toSnap() { +OIFS=$IFS +IFS=' +' + category="none" + src="$cfg" + [[ "$1" = "init" ]] && src="$smp" + [[ "$1" = "snap" ]] && src="$basecfg" + + for l in $(sed 's_;\([A-Z]*\)_\1_g' $src | grep -v -e '^;' -e '^$'); do + if echo $l | grep -q '^[[]'; then + category=$(CatToSnap "$l") + elif echo $l | grep -q '^[A-Z]'; then + option=$(OptToSnap "$l") + value=$(ValToSnap "$l") + if [[ $category = "none" ]]; then + snapctl set "$option=$value" + else + snapctl set "$category.$option=$value" + fi + fi + done +IFS=$OIFS +} + +function toIni() { +OIFS=$IFS +IFS=' +' + category="none"; option="none"; catUnset=true + src=$smp + [[ -f $cfg ]] && src="$cfg" + tmpIni="$cfg.tmp" + [[ -f $src ]] && cp "$src" "$tmpIni" + cp $tmpIni $bak + echo '' > $cfg + for l in $(grep -v -e '^;' -e '^$' $tmpIni); do + if echo $l | grep -q '^[[]'; then + category=$(CatToSnap "$l") + catUnset=true + elif echo $l | grep -q '^[A-Z]'; then + option=$(OptToSnap "$l") + if [[ $category = "none" ]]; then + value=$(snapctl get $option) + echo $(OptToIni "$option") = $value >> $cfg + else + value=$(snapctl get $category.$option) + if $catUnset; then + echo "" >> $cfg + echo "[$(CatToIni "$category")]" >> $cfg + catUnset=false + fi + echo $(OptToIni "$option") = $value >> $cfg + fi + fi + done; + IFS=$OIFS +} + +function CatToSnap { + ret=$(echo "$1" \ + | grep -oP '[A-Za-z0-9._]+' \ + | sed 's|\.|-|g' \ + | sed 's|_|99|g') + echo $ret +} +function OptToSnap { + ret=$(echo "$1" \ + | grep -oP '^[A-Z_]+' \ + | tr '[:upper:]' '[:lower:]' \ + | sed 's|_|-|g') + echo $ret +} +function ValToSnap { + ret=$(echo "$1" \ + | grep -oP '=.*$' \ + | sed 's_^= __g' \ + | sed 's_^=__g' \ + | sed "s|SNAP_DIR_DATA|$SDATA|g" \ + | sed "s|SNAP_DIR_COMMON|$SCOMMON|g" \ + | sed 's|{}||g') + echo $ret +} + +function CatToIni { + ret=$(echo "$1" \ + | sed 's|-|.|g' \ + | sed 's|\ |_|g' \ + | sed 's|99|_|g') + echo $ret +} +function OptToIni { + ret=$(echo "$1" \ + | tr '[:lower:]' '[:upper:]' \ + | sed 's|-|_|g') + echo $ret +} + +[[ "$1" = "configure" ]] \ + && toIni \ + && exit 0 + +[[ "$1" = "install" ]] \ + && echo "Initial Configuration..." \ + && mkdir -p $SNAP_COMMON/conf \ + && toSnap init \ + && toSnap snap \ + && toIni sample \ + && exit 0 + +[[ "$1" = "save" ]] \ + && echo "Saving current config..." \ + && toSnap \ + && exit 0 diff --git a/snap/helpers/simple_launcher.sh b/snap/helpers/simple_launcher.sh new file mode 100755 index 000000000..8a12e3b8d --- /dev/null +++ b/snap/helpers/simple_launcher.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if ! env | grep -q root; then + echo " + +----------------------------------------+ + | You are not running gitea as root. | + | This is required for the snap package. | + | Please re-run as root. | + +----------------------------------------+ +" + $SNAP/gitea/gitea --help + exit 1 +fi + +# Set usernames for gitea +export USERNAME=root +export USER=root + +export GITEA_WORK_DIR=$(snapctl get gitea.snap.workdir) +export GITEA_CUSTOM=$(snapctl get gitea.snap.custom) + +$SNAP/bin/gconfig save +cd $SNAP/gitea; ./gitea $@ diff --git a/snap/hooks/configure b/snap/hooks/configure new file mode 100755 index 000000000..fd7bc3da1 --- /dev/null +++ b/snap/hooks/configure @@ -0,0 +1,3 @@ +#!/bin/bash + +$SNAP/bin/gconfig configure diff --git a/snap/hooks/install b/snap/hooks/install new file mode 100755 index 000000000..dea6c268f --- /dev/null +++ b/snap/hooks/install @@ -0,0 +1,45 @@ +#!/bin/bash + +export SDATA=$(echo $SNAP_DATA | sed "s|$SNAP_REVISION|current|") +export SCOMMON="$SNAP_COMMON" +export isRoot=`true` +snapctl set gitea.snap.workdir="$SDATA/custom" +snapctl set gitea.snap.custom="$SCOMMON" + +function mkDirCommon(){ + for dir in $@; do + mkdir -p "$SCOMMON/$dir" + done +} + +function mkdirData(){ + for dir in $@; do + mkdir -p "$SDATA/$dir" + if [ -d $SNAP/$dir ]; then + cp -r --preserve=mode \ + $SNAP/$dir/* \ + $SNAP/$dir/.[a-zA-Z0-9-]* \ + $SDATA/$dir/ 2> $SCOMMON/log/snap-mkdirData.log + fi + done +} + +mkDirCommon pictures \ + repositories \ + attachments \ + data \ + log + +mkdirData certs \ + sshkeytest \ + custom/conf \ + static/templates \ + static/scripts \ + static/public + +[[ -f $SNAP_COMMON/conf/app.ini ]] || $SNAP/bin/gconfig install + +# Configure Git to use the right templates +mkdir -p $SDATA/git/ +cp -r --preserve=mode $SNAP/usr/share/git-core/templates $SDATA/git/ +$SNAP/usr/bin/git config --global init.templateDir $SDATA/git/templates/ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 000000000..7439f50f2 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,121 @@ +name: gitea +summary: Gitea - A painless self-hosted Git service +description: | + The goal of this project is to make the easiest, fastest, and most painless + way of setting up a self-hosted Git service. With Go, this can be done with + an independent binary distribution across ALL platforms that Go supports, + including Linux, Mac OS X, Windows and ARM. + +type: app +icon: public/img/gitea-lg.png +confinement: strict +grade: stable + +version: 'git' + +apps: + gitea: + command: bin/gitea + plugs: [network, network-bind] + web: + command: bin/gitea web + daemon: simple + plugs: [network, network-bind] + serv: + command: bin/gitea serv + plugs: [network, network-bind] + admin: + command: bin/gitea admin + plugs: [network, network-bind] + cert: + command: bin/gitea cert + hook: + command: bin/gitea hook + plugs: [network, network-bind] + dump: + command: bin/gitea dump + plugs: [home] + help: + command: bin/gitea --help + version: + command: bin/gitea --version + sqlite: + command: usr/bin/sqlite3 + +parts: + go: + source-tag: go1.8.3 + prime: + - -* + + gitea: + plugin: nil + source: . + source-type: git + after: [ go ] + stage-packages: [ git, sqlite3, openssh-client ] + build-packages: [ libpam0g-dev, libsqlite3-dev] + prepare: | + export PATH=$SNAPCRAFT_PART_INSTALL/../../go/install/bin:$PATH + export GOPATH=$SNAPCRAFT_PART_INSTALL/../go + export bld=$SNAPCRAFT_PART_INSTALL/../build + export src=$SNAPCRAFT_PART_INSTALL/../src + mkdir -p $GOPATH/src/code.gitea.io/gitea + cp -r $src/* $GOPATH/src/code.gitea.io/gitea + build: | + export PATH=$SNAPCRAFT_PART_INSTALL/../go/bin/:$SNAPCRAFT_PART_INSTALL/../../go/install/bin:$PATH + export GOPATH=$SNAPCRAFT_PART_INSTALL/../go + go get -u github.com/jteeuwen/go-bindata/... + cd $GOPATH/src/code.gitea.io/gitea + TAGS="bindata sqlite pam cert" make generate build + install: | + # Set Convenience Variables + src=$SNAPCRAFT_PART_INSTALL/../go/src/code.gitea.io/gitea + giteaBase=$SNAPCRAFT_PART_INSTALL/gitea + scurrent=/var/snap/$SNAPCRAFT_PROJECT_NAME/current + scommon=/var/snap/$SNAPCRAFT_PROJECT_NAME/common + # Copy build artifact and necessary files + mkdir -p $giteaBase/conf + # Workaround for gitea ignoring APP_DATA_PATH in app.ini after snap update. + ln -s $scurrent/custom $giteaBase/custom + ln -s $scommon/data $giteaBase/data + # Workaround for cmd/certs not knowing how to put files somewhere else + ln -s $scurrent/cert.pem $giteaBase/cert.pem + ln -s $scurrent/key.pem $giteaBase/key.pem + # Copy static content + mkdir -p $SNAPCRAFT_PART_INSTALL/static + cp $src/gitea $giteaBase/ + cp -r $src/LICENSE \ + $src/templates \ + $src/public \ + $src/scripts \ + $SNAPCRAFT_PART_INSTALL/static/ + cp -r $src/README.md \ + $src/LICENSE \ + $src/custom \ + $SNAPCRAFT_PART_INSTALL/ + prime: + - -etc + - -usr/lib/systemd + - -usr/lib/gcc + - -usr/lib/sasl2 + - -usr/lib/x86_64-linux-gnu/krb5 + - -usr/share/apport + - -usr/share/bash-completion + - -usr/share/doc + - -usr/share/git-core/contrib + - -usr/share/man + - -usr/share/upstart + - -var + + helpers: + plugin: dump + source: snap/helpers + organize: + simple_launcher.sh: bin/gitea + app.ini: gitea/snapApp.ini + configuration.sh: bin/gconfig + prime: + - bin/gitea + - bin/gconfig + - gitea/snapApp.ini