Skip to content

Commit

Permalink
Remove not needed variables
Browse files Browse the repository at this point in the history
  • Loading branch information
istiak101 committed Mar 13, 2024
1 parent 5ea58c3 commit 9a6b1ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
8 changes: 4 additions & 4 deletions v3/internal/commands/build_assets/rpm/app.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Name: @NAME@
Summary: @SUMMARY@
Version: @VERSION@
Release: 1%{?dist}
License: MIT
Release: @RPM_RELEASE@%{?dist}
License: @LICENSE@

Source0: %{name}
Source1: %{name}.desktop
Expand Down Expand Up @@ -36,5 +36,5 @@ update-desktop-database &> /dev/null || :


%changelog
* Sat Feb 17 2024 @AUTHOR@ <@AUTHOR_EMAIL@> - %{version}-1
- Initial build
* @RELEASE_DATE@ @AUTHOR@ <@AUTHOR_EMAIL@> - %{version}-%{release}
- Initial build
13 changes: 9 additions & 4 deletions v3/internal/templates/_common/Taskfile.tmpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ tasks:
cmds:
# Copy binary + icon to appimage dir
- cp {{ "{{.APP_BINARY}}" }} {{ "{{.APP_NAME}}" }}
- cp ../appicon.png '{{ "{{.APP_NAME}}" }}'.png
- cp ../appicon.png '{{ "{{.APP_NAME}}" }}.png'
# Generate AppImage
- wails3 generate appimage -binary {{ "{{.APP_NAME}}" }} -icon {{ "{{.ICON}}" }} -desktopfile {{ "{{.DESKTOP_FILE}}" }} -outputdir {{ "{{.OUTPUT_DIR}}" }} -builddir {{ "{{.ROOT_DIR}}" }}/build/appimage
vars:
Expand All @@ -323,27 +323,32 @@ tasks:
cmds:
# Copy binary + icon to rpmbuild dir
- cp {{ "{{.APP_BINARY}}" }} {{ "{{.APP_NAME}}" }}
- cp ../appicon.png '{{ "{{.APP_NAME}}" }}'.png
- cp ../rpm/app.spec '{{ "{{.APP_NAME}}" }}'.spec
- cp ../appicon.png '{{ "{{.APP_NAME}}" }}.png'
- cp ../rpm/app.spec '{{ "{{.APP_NAME}}" }}.spec'
- sed -i -e 's/@NAME@/{{ "{{.APP_NAME}}" }}/g'
-e 's/@SUMMARY@/{{ "{{.APP_SUMMARY}}" }}/g'
-e 's/@VERSION@/{{ "{{.APP_VERSION}}" }}/g'
-e 's/@RPM_RELEASE@/{{ "{{.RPM_RELEASE}}" }}/g'
-e 's/@DESCRIPTION@/{{ "{{.APP_DESC}}" }}/g'
-e 's/@AUTHOR@/{{ "{{.APP_AUTHOR}}" }}/g'
-e 's/@AUTHOR_EMAIL@/{{ "{{.AUTHOR_EMAIL}}" }}/g'
-e 's/@LICENSE@/{{ "{{.APP_LICENSE}}" }}/g'
-e 's/@RELEASE_DATE@/{{ "{{.RELEASE_DATE}}" }}/g'
{{ "{{.APP_NAME}}" }}.spec
# Generate RPM
- wails3 generate rpm -binary {{ "{{.APP_NAME}}" }} -icon {{ "{{.ICON}}" }} -desktopfile {{ "{{.DESKTOP_FILE}}" }} -outputdir {{ "{{.OUTPUT_DIR}}" }} -builddir {{ "{{.ROOT_DIR}}" }}/build/rpm
- mv {{ "{{.ROOT_DIR}}" }}/build/rpm/$(uname -m)/*.rpm {{ "{{.OUTPUT_DIR}}" }}
vars:
APP_NAME: '{{ "{{.APP_NAME}}" }}'
APP_SUMMARY: 'Hello Wails'
APP_VERSION: '1.0.0'
RPM_RELEASE: '1'
APP_DESC: 'Hello Wails is demo application developed on Wails.'
APP_URL: 'https://github.com/wailsapp/wails'
APP_AUTHOR: "Lea Anthony"
AUTHOR_EMAIL: "[email protected]"
APP_LICENSE: "MIT"
APP_BINARY: '../../bin/{{ "{{.APP_NAME}}" }}'
RELEASE_DATE: {{ "'{{now | date \"Mon Jan 02 2006\"}}'" }}
ICON: '../appicon.png'
DESKTOP_FILE: '{{ "{{.APP_NAME}}" }}.desktop'
OUTPUT_DIR: '../../bin'
Expand Down

0 comments on commit 9a6b1ca

Please sign in to comment.