<commit_before>version: 2
jobs:
  lint:
    docker:
      - image: golangci/golangci-lint:v1.16
    steps:
      - checkout
      - run: golangci-lint run -v -D errcheck
  build-node:
    docker:
      - image: circleci/node
    steps:
      - checkout
      - run:
          name: "Pull Submodules"
          command: |
            git submodule init
            git submodule update --remote
      - run:
          name: "Build"
          command: ./wizard.sh -a
      - run:
          name: "Cleanup"
          command: rm -rf frontend/node_modules
      - persist_to_workspace:
          root: .
          paths:
            - '*'
  build-go:
    docker:
      - image: circleci/golang:1.12
    steps:
      - attach_workspace:
          at: '~/project'
      - run:
          name: "Compile"
          command: ./wizard.sh -c
      - run:
          name: "Cleanup"
          command: |
            rm -rf frontend/build
            git checkout -- go.sum # TODO: why is it being changed?
      - persist_to_workspace:
          root: .
          paths:
            - '*'
  docker-latest:
    docker:
      - image: docker
    steps:
      - attach_workspace:
          at: '~/project'
      - setup_remote_docker
      - run: docker build -t filebrowser/filebrowser .
      - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
      - run: docker push filebrowser/filebrowser
      - run: docker logout
      - persist_to_workspace:
          root: .
          paths:
            - '*'
  release:
    docker:
      - image: circleci/golang:1.12
    steps:
      - attach_workspace:
          at: '~/project'
      - setup_remote_docker
      - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
      - run: curl -sL https://git.io/goreleaser | bash
      - run: docker logout
workflows:
  version: 2
  build-workflow:
    jobs:
      - lint:
          filters:
            tags:
              only: /.*/
      - build-node:
          filters:
            tags:
              only: /.*/
      - build-go:
          filters:
            tags:
              only: /.*/
          requires:
            - build-node
            - lint
      - release:
          context: deploy
          requires:
            - build-go
          filters:
            tags:
              only: /^v.*/
            branches:
              ignore: /.*/
      - docker-latest:
          context: deploy
          requires:
            - build-go
          filters:
            branches:
              only: master
            tags:
              ignore: /.*/
<commit_msg>fix: compile for linux/amd64<commit_after>version: 2
jobs:
  lint:
    docker:
      - image: golangci/golangci-lint:v1.16
    steps:
      - checkout
      - run: golangci-lint run -v -D errcheck
  build-node:
    docker:
      - image: circleci/node
    steps:
      - checkout
      - run:
          name: "Pull Submodules"
          command: |
            git submodule init
            git submodule update --remote
      - run:
          name: "Build"
          command: ./wizard.sh -a
      - run:
          name: "Cleanup"
          command: rm -rf frontend/node_modules
      - persist_to_workspace:
          root: .
          paths:
            - '*'
  build-go:
    docker:
      - image: circleci/golang:1.12
    steps:
      - attach_workspace:
          at: '~/project'
      - run:
          name: "Compile"
          command: GOOS=linux GOARCH=amd64 ./wizard.sh -c
      - run:
          name: "Cleanup"
          command: |
            rm -rf frontend/build
            git checkout -- go.sum # TODO: why is it being changed?
      - persist_to_workspace:
          root: .
          paths:
            - '*'
  docker-latest:
    docker:
      - image: docker
    steps:
      - attach_workspace:
          at: '~/project'
      - setup_remote_docker
      - run: docker build -t filebrowser/filebrowser .
      - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
      - run: docker push filebrowser/filebrowser
      - run: docker logout
      - persist_to_workspace:
          root: .
          paths:
            - '*'
  release:
    docker:
      - image: circleci/golang:1.12
    steps:
      - attach_workspace:
          at: '~/project'
      - setup_remote_docker
      - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
      - run: curl -sL https://git.io/goreleaser | bash
      - run: docker logout
workflows:
  version: 2
  build-workflow:
    jobs:
      - lint:
          filters:
            tags:
              only: /.*/
      - build-node:
          filters:
            tags:
              only: /.*/
      - build-go:
          filters:
            tags:
              only: /.*/
          requires:
            - build-node
            - lint
      - release:
          context: deploy
          requires:
            - build-go
          filters:
            tags:
              only: /^v.*/
            branches:
              ignore: /.*/
      - docker-latest:
          context: deploy
          requires:
            - build-go
          filters:
            branches:
              only: master
            tags:
              ignore: /.*/

{'fraction_non_alphanumeric': 0.10133436472635854, 'fraction_numerical': 0.0050280409978727516, 'mean_word_length': 1.1292713050638123, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5036316', 'n_tokens_mistral': 1626, 'n_tokens_neox': 1538, 'n_words': 363}