From 61fbe7242c16d4b13754d98ef5ebcbf58fcb3e26 Mon Sep 17 00:00:00 2001 From: nyyu Date: Mon, 22 Aug 2022 22:55:41 +0200 Subject: [PATCH] fix changelog --- .drone.yml | 146 ++++++++++++++++++++++++++--------------------------- sync.sh | 2 +- 2 files changed, 73 insertions(+), 75 deletions(-) diff --git a/.drone.yml b/.drone.yml index 83c8d2f..2a54335 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,68 +7,65 @@ environment: version: 18.1 steps: -- name: sync - pull: always - image: docker.nyyu.dev/lineage/android:latest - commands: - - cd /build - - rm -rf .repo/repo - - repo init -u https://github.com/LineageOS/android.git -b lineage-$version - - mkdir -p .repo/local_manifests - - cp $DRONE_WORKSPACE_BASE/$device.xml .repo/local_manifests/roomservice.xml - - bash $DRONE_WORKSPACE_BASE/sync.sh - volumes: + - name: sync + pull: always + image: docker.nyyu.dev/lineage/android:latest + commands: + - cd /build + - rm -rf .repo/repo + - repo init -u https://github.com/LineageOS/android.git -b lineage-$version + - mkdir -p .repo/local_manifests + - cp $DRONE_WORKSPACE_BASE/$device.xml .repo/local_manifests/roomservice.xml + - bash $DRONE_WORKSPACE_BASE/sync.sh + volumes: + - name: build + path: /build - name: build - path: /build -- name: build - pull: always - image: docker.nyyu.dev/lineage/android:latest - commands: - - cd /build - - bash -c ". build/envsetup.sh && lunch lineage_$device-userdebug && mka bacon -j6" - volumes: - - name: build - path: /build -- name: copy - pull: always - image: docker.nyyu.dev/lineage/android:latest - commands: - - rm -f /http/lineage-$version-*-UNOFFICIAL-$device.zip* - - mv -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip* /http/ - - cat /build/changelog_${device}_${version}.md >> /http/changelog_${device}_${version}.md - - ls -lh /http/lineage-$version-*-UNOFFICIAL-$device.zip* - volumes: - - name: build - path: /build - - name: http - path: /http -- name: clean - pull: always - image: docker.nyyu.dev/lineage/android:latest - commands: - - rm -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip_* /build/out/target/product/$device/lineage_$device-ota-eng.*.zip - - rm -f /build/changelog_${device}_${version}.md - volumes: - - name: build - path: /build + pull: always + image: docker.nyyu.dev/lineage/android:latest + commands: + - cd /build + - bash -c ". build/envsetup.sh && lunch lineage_$device-userdebug && mka bacon -j6" + volumes: + - name: build + path: /build + - name: copy + pull: always + image: docker.nyyu.dev/lineage/android:latest + commands: + - rm -f /http/lineage-$version-*-UNOFFICIAL-$device.zip* + - mv -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip* /http/ + - cat /build/changelog-$device-$version.md >> /http/changelog-$device-$version.md + - ls -lh /http/lineage-$version-*-UNOFFICIAL-$device.zip* + volumes: + - name: build + path: /build + - name: http + path: /http + - name: clean + pull: always + image: docker.nyyu.dev/lineage/android:latest + commands: + - rm -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip_* /build/out/target/product/$device/lineage_$device-ota-eng.*.zip + - rm -f /build/changelog-$device-$version.md + volumes: + - name: build + path: /build trigger: event: - - custom - - cron + - custom + - cron volumes: -- name: http - host: - path: /srv/http/drone -- name: build - host: - path: /drone/lineage-18.1 -- name: publish - host: - path: /mnt/android/lineage + - name: http + host: + path: /srv/http/drone + - name: build + host: + path: /drone/lineage-18.1 image_pull_secrets: -- dockerconfig + - dockerconfig --- kind: pipeline type: docker @@ -79,29 +76,30 @@ environment: version: 18.1 steps: -- name: publish - pull: always - image: docker.nyyu.dev/lineage/android:latest - commands: - - mv /http/lineage-$version-*-UNOFFICIAL-$device.zip* /publish/$version/$device/ - - cat /http/changelog_${device}_${version}.md >> /publish/$version/$device/changelog.md - - ls -lh /publish/$version/$device/ - volumes: - - name: http - path: /http - name: publish - path: /publish + pull: always + image: docker.nyyu.dev/lineage/android:latest + commands: + - mv /http/lineage-$version-*-UNOFFICIAL-$device.zip* /publish/$version/$device/ + - cat /http/changelog-$device-$version.md >> /publish/$version/$device/changelog.md + - rm -f /http/changelog-$device-$version.md + - ls -lh /publish/$version/$device/ + volumes: + - name: http + path: /http + - name: publish + path: /publish trigger: event: - - promote + - promote volumes: -- name: http - host: - path: /srv/http/drone -- name: publish - host: - path: /mnt/android/lineage + - name: http + host: + path: /srv/http/drone + - name: publish + host: + path: /mnt/android/lineage image_pull_secrets: -- dockerconfig + - dockerconfig diff --git a/sync.sh b/sync.sh index 7950312..0c819d6 100644 --- a/sync.sh +++ b/sync.sh @@ -1,7 +1,7 @@ #!/bin/bash TOPDIR=$(pwd) -changelog=${TOPDIR}/changelog_${device}_${version}.md +changelog=${TOPDIR}/changelog-${device}-${version}.md declare -A before tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse HEAD)"'))