fix changelog
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
nyyu 2022-08-22 22:55:41 +02:00
parent edd5667917
commit 61fbe7242c
2 changed files with 73 additions and 75 deletions

View File

@ -7,68 +7,65 @@ environment:
version: 18.1 version: 18.1
steps: steps:
- name: sync - name: sync
pull: always pull: always
image: docker.nyyu.dev/lineage/android:latest image: docker.nyyu.dev/lineage/android:latest
commands: commands:
- cd /build - cd /build
- rm -rf .repo/repo - rm -rf .repo/repo
- repo init -u https://github.com/LineageOS/android.git -b lineage-$version - repo init -u https://github.com/LineageOS/android.git -b lineage-$version
- mkdir -p .repo/local_manifests - mkdir -p .repo/local_manifests
- cp $DRONE_WORKSPACE_BASE/$device.xml .repo/local_manifests/roomservice.xml - cp $DRONE_WORKSPACE_BASE/$device.xml .repo/local_manifests/roomservice.xml
- bash $DRONE_WORKSPACE_BASE/sync.sh - bash $DRONE_WORKSPACE_BASE/sync.sh
volumes: volumes:
- name: build
path: /build
- name: build - name: build
path: /build pull: always
- name: build image: docker.nyyu.dev/lineage/android:latest
pull: always commands:
image: docker.nyyu.dev/lineage/android:latest - cd /build
commands: - bash -c ". build/envsetup.sh && lunch lineage_$device-userdebug && mka bacon -j6"
- cd /build volumes:
- bash -c ". build/envsetup.sh && lunch lineage_$device-userdebug && mka bacon -j6" - name: build
volumes: path: /build
- name: build - name: copy
path: /build pull: always
- name: copy image: docker.nyyu.dev/lineage/android:latest
pull: always commands:
image: docker.nyyu.dev/lineage/android:latest - rm -f /http/lineage-$version-*-UNOFFICIAL-$device.zip*
commands: - mv -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip* /http/
- rm -f /http/lineage-$version-*-UNOFFICIAL-$device.zip* - cat /build/changelog-$device-$version.md >> /http/changelog-$device-$version.md
- mv -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip* /http/ - ls -lh /http/lineage-$version-*-UNOFFICIAL-$device.zip*
- cat /build/changelog_${device}_${version}.md >> /http/changelog_${device}_${version}.md volumes:
- ls -lh /http/lineage-$version-*-UNOFFICIAL-$device.zip* - name: build
volumes: path: /build
- name: build - name: http
path: /build path: /http
- name: http - name: clean
path: /http pull: always
- name: clean image: docker.nyyu.dev/lineage/android:latest
pull: always commands:
image: docker.nyyu.dev/lineage/android:latest - rm -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip_* /build/out/target/product/$device/lineage_$device-ota-eng.*.zip
commands: - rm -f /build/changelog-$device-$version.md
- rm -f /build/out/target/product/$device/lineage-$version-*-UNOFFICIAL-$device.zip_* /build/out/target/product/$device/lineage_$device-ota-eng.*.zip volumes:
- rm -f /build/changelog_${device}_${version}.md - name: build
volumes: path: /build
- name: build
path: /build
trigger: trigger:
event: event:
- custom - custom
- cron - cron
volumes: volumes:
- name: http - name: http
host: host:
path: /srv/http/drone path: /srv/http/drone
- name: build - name: build
host: host:
path: /drone/lineage-18.1 path: /drone/lineage-18.1
- name: publish
host:
path: /mnt/android/lineage
image_pull_secrets: image_pull_secrets:
- dockerconfig - dockerconfig
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
@ -79,29 +76,30 @@ environment:
version: 18.1 version: 18.1
steps: 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 - 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: trigger:
event: event:
- promote - promote
volumes: volumes:
- name: http - name: http
host: host:
path: /srv/http/drone path: /srv/http/drone
- name: publish - name: publish
host: host:
path: /mnt/android/lineage path: /mnt/android/lineage
image_pull_secrets: image_pull_secrets:
- dockerconfig - dockerconfig

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
TOPDIR=$(pwd) TOPDIR=$(pwd)
changelog=${TOPDIR}/changelog_${device}_${version}.md changelog=${TOPDIR}/changelog-${device}-${version}.md
declare -A before declare -A before
tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse HEAD)"')) tmp=($(repo forall -c 'echo "${REPO_PATH}:$(git rev-parse HEAD)"'))