diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..cdf04ff --- /dev/null +++ b/.drone.yml @@ -0,0 +1,108 @@ +kind: pipeline +type: docker +name: default + +trigger: + event: + - tag + +concurrency: + limit: 1 + +workspace: + path: /drone/src + +steps: + - name: checkout submodule + image: alpine/git + commands: + - git submodule update --init --recursive + - name: checkout tag + image: alpine/git + commands: + - cd exa + - git fetch --all --tags + - git checkout tags/${DRONE_TAG} + depends_on: + - "checkout submodule" + - name: cargo build + image: rust:latest + commands: + - cd exa + - cargo build --release --target x86_64-unknown-linux-gnu + - cd target/x86_64-unknown-linux-gnu/release + depends_on: + - "checkout tag" + - name: verify + image: rust:latest + commands: + - mkdir /tmp/verify && cd /tmp/verify && touch verify + - /drone/src/exa/target/x86_64-unknown-linux-gnu/release/exa --long + - lines=$(/drone/src/exa/target/x86_64-unknown-linux-gnu/release/exa --long | wc -l) + - if test $lines -ne 1; then exit 1; fi + depends_on: + - "cargo build" + - name: build slackware package + image: vbatts/slackware:14.2 + commands: + - mkdir -p dist/usr/sbin + - cp exa/target/x86_64-unknown-linux-gnu/release/exa ./dist/usr/sbin/exa + - cp -R ./usr ./dist + - chmod +x ./dist/usr/sbin/exa + - cd dist + - makepkg -l y -c y ../unraid-exa-${DRONE_TAG}.txz + depends_on: + - "verify" + - name: prepare release + image: vbatts/slackware:14.2 + commands: + - echo "exa ${DRONE_TAG} - built@$(date '+%FT%TZ') [Drone ${DRONE_SYSTEM_VERSION}]" > ./release_note + - cat ./release_note + depends_on: + - "build slackware package" + - name: publish gitea release + image: plugins/gitea-release + settings: + api_key: + from_secret: GITEA_KEY + base_url: https://git.panaetius.co.uk + files: + - ./unraid-exa-${DRONE_TAG}.txz + checksum: + - md5 + title: ${DRONE_TAG} + note: ./release_note + file_exists: "skip" + when: + event: tag + depends_on: + - "prepare release" + - name: publish github release + image: plugins/github-release + settings: + api_key: + from_secret: GITHUB_KEY + files: + - ./unraid-exa-${DRONE_TAG}.txz + checksum: + - md5 + title: ${DRONE_TAG} + note: ./release_note + file_exists: "skip" + when: + event: tag + depends_on: + - "prepare release" + - name: slack + image: plugins/slack + settings: + webhook: + from_secret: BUILD_STATUS_SLACK_WEBHOOK + username: drone + when: + status: + - "success" + - "failure" + depends_on: + - "publish gitea release" + - "publish github release" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd5106f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_STORE diff --git a/README.md b/README.md index a740338..f0bf94c 100644 --- a/README.md +++ b/README.md @@ -1 +1,16 @@ -# unraid-rip +# rip + +This is the repository for the unraid rip plugin. + + + +rip is a command-line deletion tool focused on safety, ergonomics, and performance. It favors a simple interface, and does not implement the xdg-trash spec or attempt to achieve the same goals. + +Deleted files get sent to the graveyard (`/tmp/graveyard-$USER` by default, see notes on changing this) under their absolute path, giving you a chance to recover them. No data is overwritten. If files that share the same path are deleted, they will be renamed as numbered backups. + +For more information see the [rip repository](https://github.com/nivekuil/rip). +## dev + +Drone builds the plugin source using cargo on a new tag creation. + +Tag versions follow rip releases. diff --git a/assets/unraid-rip.png b/assets/unraid-rip.png new file mode 100644 index 0000000..8b22125 Binary files /dev/null and b/assets/unraid-rip.png differ diff --git a/dev.unraid-rip.plg b/dev.unraid-rip.plg new file mode 100644 index 0000000..3da1c75 --- /dev/null +++ b/dev.unraid-rip.plg @@ -0,0 +1,73 @@ + + + + + + + + + + + +]> + + + + + +### 2022-05-06 + +- Initial release - rip v0.13.1 + + + + + + +file=$(/usr/bin/ls /boot/config/plugins/&name;/&name;*.txz | grep -v '&version;') +if [ ! -z "$file" ] +then + filename=$(basename -- $file) + previous="${filename%.*}" + echo "previous version ${previous} found - uninstalling" + removepkg $previous + rm -f $file +else + echo "no previous version found - first time install" +fi + + + + +&releaseURL; +&md5; + + + + +**rip** + +rip is a command-line deletion tool focused on safety, ergonomics, and performance. It favors a simple interface, and does not implement the xdg-trash spec or attempt to achieve the same goals. + +Deleted files get sent to the graveyard (`/tmp/graveyard-$USER` by default, see notes on changing this) under their absolute path, giving you a chance to recover them. No data is overwritten. If files that share the same path are deleted, they will be renamed as numbered backups. + +For more information see the [rip repository](https://github.com/nivekuil/rip). + + + + + +echo "*** Removing rip ***" + +# Remove plugin related files +removepkg &name;-&version; + +rm -rf &emhttp; +rm -rf &plugin; + +echo +echo "*** Successfully removed rip ***" + + + diff --git a/unraid-rip.png b/unraid-rip.png new file mode 100644 index 0000000..8b22125 Binary files /dev/null and b/unraid-rip.png differ diff --git a/usr/local/emhttp/plugins/unraid-rip/images/unraid-rip.png b/usr/local/emhttp/plugins/unraid-rip/images/unraid-rip.png new file mode 100644 index 0000000..8b22125 Binary files /dev/null and b/usr/local/emhttp/plugins/unraid-rip/images/unraid-rip.png differ