diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 85b5a0f..f4d1ae1 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -11,9 +11,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Get version - id: version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} - name: Create release id: create_release @@ -26,24 +23,10 @@ jobs: draft: true prerelease: false - - name: Build deb for iphoneos-arm - uses: jiro4989/build-deb-action@v2 - with: - package: com.propr.nekofetch - package_root: pkgroot - maintainer: propr and bbaovanc - version: ${{ steps.version.outputs.VERSION }} - arch: 'iphoneos-arm' - desc: 'neofetch with nekos' - - name: Build deb for amd64 - uses: jiro4989/build-deb-action@v2 - with: - package: nekofetch - package_root: pkgroot - maintainer: propr and bbaovanc - version: ${{ steps.version.outputs.VERSION }} - arch: 'amd64' - desc: 'neofetch with nekos' + - name: Build iOS deb + run: make iosdeb + - name: Build amd64 deb + run: make amd64deb - name: Upload iphoneos-arm asset id: upload-iphoneos-arm-asset diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 722f4e6..981a7d0 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -9,6 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Run shellcheck uses: ludeeus/action-shellcheck@master @@ -17,28 +18,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Get commit hash - id: hash - run: echo "::set-output name=SHA_SHORT::$(git rev-parse --short HEAD)" - - name: Build deb for iphoneos-arm - uses: jiro4989/build-deb-action@v2 - with: - package: com.propr.nekofetch - package_root: pkgroot - maintainer: propr and bbaovanc - version: 0-git-${{ steps.hash.outputs.sha_short }} - arch: 'iphoneos-arm' - desc: 'neofetch with nekos' - - name: Build deb for amd64 - uses: jiro4989/build-deb-action@v2 - with: - package: nekofetch - package_root: pkgroot - maintainer: propr and bbaovanc - version: 0-git-${{ steps.hash.outputs.sha_short }} - arch: 'amd64' - desc: 'neofetch with nekos' + - name: Build iOS deb + run: make iosdeb + - name: Build amd64 deb + run: make amd64deb - name: Upload iphoneos-arm deb as artifact uses: actions/upload-artifact@v2 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9942ef5 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +VERSION ?= $(shell git tag --points-at HEAD) +VERSION += 0-git-$(shell git rev-parse --short HEAD) +VERSION := $(word 1, $(VERSION)) + +all: options iosdeb amd64deb + +options: + @echo "VERSION: $(VERSION)" + +ioscontrol: + cp control.template ioscontrol + sed -i 's/PACKAGE/com.propr.nekofetch/' ioscontrol + sed -i 's/ARCH/iphoneos-arm/' ioscontrol + sed -i 's/VERSION/$(VERSION)/' ioscontrol +amd64control: + cp control.template amd64control + sed -i 's/PACKAGE/nekofetch/' amd64control + sed -i 's/ARCH/amd64/' amd64control + sed -i 's/VERSION/$(VERSION)/' amd64control + +iosdebroot: ioscontrol + mkdir -p iosdebroot/DEBIAN + mkdir -p iosdebroot/usr/bin + cp ioscontrol iosdebroot/DEBIAN/control + cp nekofetch iosdebroot/usr/bin/nekofetch +amd64debroot: amd64control + mkdir -p amd64debroot/DEBIAN + mkdir -p amd64debroot/usr/bin + cp amd64control amd64debroot/DEBIAN/control + cp nekofetch amd64debroot/usr/bin/nekofetch + +iosdeb: iosdebroot + dpkg-deb -b "iosdebroot" "com.propr.nekofetch_$(VERSION)_iphoneos-arm.deb" +amd64deb: amd64debroot + dpkg-deb -b "amd64debroot" "nekofetch_$(VERSION)_amd64.deb" + +clean: + rm -rf iosdebroot amd64debroot + rm -f ioscontrol amd64control + rm -f com.propr.nekofetch_*_iphoneos-arm.deb nekofetch_*_amd64.deb + +.PHONY: all options clean iosdeb amd64deb diff --git a/control.template b/control.template new file mode 100644 index 0000000..f2d144f --- /dev/null +++ b/control.template @@ -0,0 +1,5 @@ +Package: PACKAGE +Architecture: ARCH +Version: VERSION +Depends: curl, jq, jp2a, neofetch +Description: neofetch but with nekos diff --git a/pkgroot/usr/bin/nekofetch b/nekofetch similarity index 100% rename from pkgroot/usr/bin/nekofetch rename to nekofetch