diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..34ecde9 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,99 @@ +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 ox + - git fetch --all --tags + - git checkout tags/${DRONE_TAG} + depends_on: + - "checkout submodule" + - name: cargo build + image: rust:latest + commands: + - cd ox + - cargo build --release --target x86_64-unknown-linux-gnu + - cd target/x86_64-unknown-linux-gnu/release + depends_on: + - "checkout tag" + - name: build slackware package + image: vbatts/slackware:14.2 + commands: + - mkdir -p dist/usr/sbin + - cp ox/target/x86_64-unknown-linux-gnu/release/ox ./dist/usr/sbin/ox + - cp -R ./usr ./dist + - chmod +x ./dist/usr/sbin/ox + - cd dist + - makepkg -l y -c y ../unraid-ox-${DRONE_TAG}.txz + depends_on: + - "cargo build" + - name: prepare release + image: vbatts/slackware:14.2 + commands: + - echo "ox ${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-ox-${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-ox-${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 9a4a43d..2bf61d8 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# ox +# bottom -This is the repository for the unraid ox plugin. +This is the repository for the unraid bottom plugin. - + -Ox is a code editor that runs in your terminal. +A customizable cross-platform graphical process/system monitor for the terminal. -For more information see the [ox repository](https://github.com/curlpipe/ox). +For more information see the [bottom repository](https://github.com/ClementTsang/bottom). ## dev Drone builds the plugin source using cargo on a new tag creation. -Tag versions follow ox releases. +Tag versions follow bottom releases. diff --git a/assets/unraid-bottom.gif b/assets/unraid-bottom.gif new file mode 100644 index 0000000..1f2b841 Binary files /dev/null and b/assets/unraid-bottom.gif differ diff --git a/dev.unraid-bottom.plg b/dev.unraid-bottom.plg new file mode 100644 index 0000000..e44561f --- /dev/null +++ b/dev.unraid-bottom.plg @@ -0,0 +1,71 @@ + + + + + + + + + + + +]> + + + + + +### 2022-05-06 + +- Initial release - ox 0.2.7 + + + + + + +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; + + + + +**ox** + +Ox is a code editor that runs in your terminal. + +For more information see the [ox repository](https://github.com/curlpipe/ox). + + + + + +echo "*** Removing ox ***" + +# Remove plugin related files +removepkg &name;-&version; + +rm -rf &emhttp; +rm -rf &plugin; + +echo +echo "*** Successfully removed ox ***" + + + diff --git a/unraid-bottom.plg b/unraid-bottom.plg new file mode 100644 index 0000000..92dfafc --- /dev/null +++ b/unraid-bottom.plg @@ -0,0 +1,70 @@ + + + + + + + + + + + +]> + + + + +### 2022-05-06 + +- Initial release - ox 0.2.7 + + + + + + +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; + + + + +**ox** + +Ox is a code editor that runs in your terminal. + +For more information see the [ox repository](https://github.com/curlpipe/ox). + + + + + +echo "*** Removing ox ***" + +# Remove plugin related files +removepkg &name;-&version; + +rm -rf &emhttp; +rm -rf &plugin; + +echo +echo "*** Successfully removed ox ***" + + + diff --git a/usr/local/emhttp/plugins/unraid-bottom/images/unraid-bottom.png b/usr/local/emhttp/plugins/unraid-bottom/images/unraid-bottom.png new file mode 100644 index 0000000..82520d6 Binary files /dev/null and b/usr/local/emhttp/plugins/unraid-bottom/images/unraid-bottom.png differ