|
| 1 | +# ___ ___ ___ |
| 2 | +# / /\ /__/\ /__/\ |
| 3 | +# / /:/_ \ \:\ \ \:\ |
| 4 | +# / /:/ /\ \ \:\ \ \:\ |
| 5 | +# / /:/ /::\ ___ \ \:\ _____\__\:\ |
| 6 | +# /__/:/ /:/\:\ /__/\ \__\:\ /__/::::::::\ |
| 7 | +# \ \:\/:/~/:/ \ \:\ / /:/ \ \:\~~\~~\/ |
| 8 | +# \ \::/ /:/ \ \:\ /:/ \ \:\ ~~~ |
| 9 | +# \__\/ /:/ \ \:\/:/ \ \:\ |
| 10 | +# /__/:/ \ \::/ \ \:\ |
| 11 | +# \__\/ \__\/ \__\/ |
| 12 | +# |
| 13 | +#MIT License |
| 14 | +# |
| 15 | +#Copyright (c) 2020 Jviguy |
| 16 | +# |
| 17 | +#Permission is hereby granted, free of charge, to any person obtaining a copy |
| 18 | +#of this software and associated documentation files (the "Software"), to deal |
| 19 | +#in the Software without restriction, including without limitation the rights |
| 20 | +#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 21 | +#copies of the Software, and to permit persons to whom the Software is |
| 22 | +#furnished to do so, subject to the following conditions: |
| 23 | +# |
| 24 | +#The above copyright notice and this permission notice shall be included in all |
| 25 | +#copies or substantial portions of the Software. |
| 26 | +# |
| 27 | +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 28 | +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 29 | +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 30 | +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 31 | +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 32 | +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 33 | +#SOFTWARE. |
| 34 | + |
| 35 | +version: 2.1 |
| 36 | +orbs: |
| 37 | + |
| 38 | +jobs: |
| 39 | + build: |
| 40 | + docker: |
| 41 | + # specify the version |
| 42 | + - image: circleci/golang:1.13 |
| 43 | + |
| 44 | + # Specify service dependencies here if necessary |
| 45 | + # CircleCI maintains a library of pre-built images |
| 46 | + # documented at https://circleci.com/docs/2.0/circleci-images/ |
| 47 | + # - image: circleci/postgres:9.4 |
| 48 | + |
| 49 | + #### TEMPLATE_NOTE: go expects specific checkout path representing url |
| 50 | + #### expecting it in the form of |
| 51 | + #### /go/src/github.com/circleci/go-tool |
| 52 | + #### /go/src/bitbucket.org/circleci/go-tool |
| 53 | + working_directory: /go/src/github.com/sun_proxy/installer |
| 54 | + steps: |
| 55 | + - checkout |
| 56 | + |
| 57 | + # specify any bash command here prefixed with `run: ` |
| 58 | + |
| 59 | + - discord/notify: |
| 60 | + color: '4383476' |
| 61 | + webhook: $DISCORD_WEBHOOK |
| 62 | + |
| 63 | + - run: |
| 64 | + name: Get Modules |
| 65 | + command: | |
| 66 | + go get -v -t -d ./...; |
| 67 | + - run: |
| 68 | + name: Build Binaries |
| 69 | + command: | |
| 70 | + env go build -o sun_installer_linux64; |
| 71 | + env GOARCH=arm go build -o sun_installer_linux32; |
| 72 | + env GOOS=windows GOARCH=amd64 go build -o sun_installer_windows64.exe; |
| 73 | + env GOOS=windows GOARCH=arm go build -o sun_installer_windows32.exe; |
| 74 | + env GOOS=darwin GOARCH=amd64 go build -o sun_installer_darwin64; |
| 75 | + - run: |
| 76 | + name: make Artifact Folder |
| 77 | + command: | |
| 78 | + mkdir /tmp/artifacts; |
| 79 | + - run: |
| 80 | + name: Move Binaries |
| 81 | + command: | |
| 82 | + mv sun_installer_linux64 /tmp/artifacts; |
| 83 | + mv sun_installer_linux32 /tmp/artifacts; |
| 84 | + mv sun_installer_windows64.exe /tmp/artifacts; |
| 85 | + mv sun_installer_windows32.exe /tmp/artifacts; |
| 86 | + mv sun_installer_darwin64 /tmp/artifacts; |
| 87 | + - discord/status: |
| 88 | + webhook: $DISCORD_WEBHOOK |
| 89 | + |
| 90 | + - store_artifacts: |
| 91 | + path: /tmp/artifacts |
0 commit comments