Skip to content

Commit

Permalink
Move archive into it's own sub-command. Closes #243
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Mar 4, 2023
1 parent 7e31bcb commit 91e0df4
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 327 deletions.
39 changes: 21 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on: [push]
on: [ push ]

name: CI

Expand All @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- os: ubuntu-latest
bin: git-workspace
Expand Down Expand Up @@ -51,50 +51,53 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build

- name: git workspace add orf
uses: actions-rs/cargo@v1
with:
command: run
args: add github orf --skip-forks

- name: git workspace add github org
uses: actions-rs/cargo@v1
with:
command: run
args: add github django
# - name: git-workspace add gitlab user
# uses: actions-rs/cargo@v1
# with:
# command: run
# args: add -f workspace-gitlab.toml gitlab tom6
# - name: git-workspace add gitlab group
# uses: actions-rs/cargo@v1
# with:
# command: run
# args: add -f workspace-gitlab.toml gitlab gitlab-org/frontend --env-name GITLAB_ALTERNATIVE_TOKEN
args: add github django --exclude="django$"

- name: git-workspace update
uses: actions-rs/cargo@v1
with:
command: run
args: update

- name: git-workspace fetch
uses: actions-rs/cargo@v1
with:
command: run
args: fetch

- name: git-workspace list
uses: actions-rs/cargo@v1
with:
command: run
args: list
# - name: Remove workspace
# shell: bash
# run: |
# rm ${GIT_WORKSPACE}/workspace.toml ${GIT_WORKSPACE}/workspace-gitlab.toml

- name: Remove workspace
shell: bash
run: rm ${GIT_WORKSPACE}/workspace.toml ${GIT_WORKSPACE}/workspace.toml

- name: git-workspace archive
uses: actions-rs/cargo@v1
with:
command: run
args: archive --force

- name: archive everything
uses: actions-rs/cargo@v1
with:
command: run
args: update
args: archive

- name: Build release
if: startsWith(github.ref, 'refs/tags/')
uses: actions-rs/cargo@v1
Expand Down
20 changes: 10 additions & 10 deletions example_workspace/workspace-github.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#[[provider]]
#provider = "github"
#name = "django"
#path = "github"
#env_var = "GITHUB_TOKEN"
#skip_forks = false
#exclude = [
# "djangobench$",
# "dsf-.*"
#]
[[provider]]
provider = "github"
name = "django"
path = "github"
env_var = "GITHUB_TOKEN"
skip_forks = false
exclude = [
"djangobench$",
"dsf-.*"
]
254 changes: 1 addition & 253 deletions example_workspace/workspace-lock.toml
Original file line number Diff line number Diff line change
@@ -1,253 +1 @@
[[repo]]
path = "github/django/.github"
url = "[email protected]:django/.github.git"
branch = "main"

[[repo]]
path = "github/django/asgiref"
url = "[email protected]:django/asgiref.git"
branch = "main"

[[repo]]
path = "github/django/channels"
url = "[email protected]:django/channels.git"
branch = "main"

[[repo]]
path = "github/django/channels_redis"
url = "[email protected]:django/channels_redis.git"
branch = "main"

[[repo]]
path = "github/django/code-of-conduct"
url = "[email protected]:django/code-of-conduct.git"
branch = "main"

[[repo]]
path = "github/django/code.djangoproject.com"
url = "[email protected]:django/code.djangoproject.com.git"
branch = "main"

[[repo]]
path = "github/django/daphne"
url = "[email protected]:django/daphne.git"
branch = "main"

[[repo]]
path = "github/django/deps"
url = "[email protected]:django/deps.git"
branch = "main"

[[repo]]
path = "github/django/django"
url = "[email protected]:django/django.git"
branch = "main"

[[repo]]
path = "github/django/django-asv"
url = "[email protected]:django/django-asv.git"
branch = "main"

[[repo]]
path = "github/django/django-contrib-comments"
url = "[email protected]:django/django-contrib-comments.git"
branch = "master"

[[repo]]
path = "github/django/django-docker-box"
url = "[email protected]:django/django-docker-box.git"
upstream = "[email protected]:orf/django-docker-box.git"
branch = "main"

[[repo]]
path = "github/django/django-docs-translations"
url = "[email protected]:django/django-docs-translations.git"
branch = "main"

[[repo]]
path = "github/django/django-fuzzers"
url = "[email protected]:django/django-fuzzers.git"
branch = "master"

[[repo]]
path = "github/django/django-localflavor"
url = "[email protected]:django/django-localflavor.git"
branch = "master"

[[repo]]
path = "github/django/djangoproject.com"
url = "[email protected]:django/djangoproject.com.git"
branch = "main"

[[repo]]
path = "github/django/djangosnippets.org"
url = "[email protected]:django/djangosnippets.org.git"
branch = "main"

[[repo]]
path = "github/django/ticketbot"
url = "[email protected]:django/ticketbot.git"
branch = "main"

[[repo]]
path = "gitlab/tom6/backend-coding-challenge"
url = "[email protected]:tom6/backend-coding-challenge.git"
branch = "master"

[[repo]]
path = "gitlab/tom6/jiri-gitlab"
url = "[email protected]:tom6/jiri-gitlab.git"
branch = "master"

[[repo]]
path = "gitlab/tom6/metrics-bug"
url = "[email protected]:tom6/metrics-bug.git"
branch = "master"

[[repo]]
path = "gitlab/tom6/minimal-ruby-app"
url = "[email protected]:tom6/minimal-ruby-app.git"
branch = "master"

[[repo]]
path = "gitlab/tom6/resizer"
url = "[email protected]:tom6/resizer.git"
branch = "master"

[[repo]]
path = "gitlab/tom6/test-empty-project"
url = "[email protected]:tom6/test-empty-project.git"

[[repo]]
path = "gitlab/tom6/test-lfs"
url = "[email protected]:tom6/test-lfs.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/Awesome-Geospatial"
url = "[email protected]:foobar/Awesome-Geospatial.git"
upstream = "[email protected]:sacridini/Awesome-Geospatial.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/VictoriaMetrics"
url = "[email protected]:foobar/VictoriaMetrics.git"
upstream = "[email protected]:VictoriaMetrics/VictoriaMetrics.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/algc"
url = "[email protected]:foobar/algc.git"
upstream = "[email protected]:a1exwang/algc.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/algo"
url = "[email protected]:foobar/algo.git"
upstream = "[email protected]:hoanhan101/algo.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/centos-repo"
url = "[email protected]:foobar/centos-repo.git"
upstream = "[email protected]:cloudrouter/centos-repo.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/concurrent-persistent-datastructure"
url = "[email protected]:foobar/concurrent-persistent-datastructure.git"
upstream = "[email protected]:aajayssingh/concurrent-persistent-datastructure.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/docs.influxdata.com"
url = "[email protected]:foobar/docs.influxdata.com.git"
upstream = "[email protected]:influxdata/docs.influxdata.com-ARCHIVE.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/fast17"
url = "[email protected]:foobar/fast17.git"
upstream = "[email protected]:andyrudoff/fast17.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/fucking-algorithm"
url = "[email protected]:foobar/fucking-algorithm.git"
upstream = "[email protected]:labuladong/fucking-algorithm.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/go-profiler-notes"
url = "[email protected]:foobar/go-profiler-notes.git"
upstream = "[email protected]:DataDog/go-profiler-notes.git"
branch = "main"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/influxdb"
url = "[email protected]:foobar/influxdb.git"
upstream = "[email protected]:influxdata/influxdb.git"
branch = "1.7"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/influxdb1-client"
url = "[email protected]:foobar/influxdb1-client.git"
upstream = "[email protected]:influxdata/influxdb1-client.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/infobright"
url = "[email protected]:foobar/infobright.git"
upstream = "[email protected]:magiczqw/infobright.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/infobright-4.0.7"
url = "[email protected]:foobar/infobright-4.0.7.git"
upstream = "[email protected]:guanlisheng/infobright-4.0.7.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/infobright-core"
url = "[email protected]:foobar/infobright-core.git"
upstream = "[email protected]:EidosMedia/infobright-core.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/misc"
url = "[email protected]:foobar/misc.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/mysql-server"
url = "[email protected]:foobar/mysql-server.git"
upstream = "[email protected]:mysql/mysql-server.git"
branch = "c++17"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/optpls"
url = "[email protected]:foobar/optpls.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/stonedb"
url = "[email protected]:foobar/stonedb.git"
upstream = "[email protected]:stoneatom/stonedb.git"
branch = "stonedb-5.6"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/stx-btree"
url = "[email protected]:foobar/stx-btree.git"
upstream = "[email protected]:bingmann/stx-btree.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/tmp"
url = "[email protected]:foobar/tmp.git"
branch = "master"

[[repo]]
path = "omgdgsdgsdsgdgssdggds/foobar/tsbs"
url = "[email protected]:foobar/tsbs.git"
upstream = "[email protected]:timescale/tsbs.git"
branch = "master"
repo = []
19 changes: 5 additions & 14 deletions example_workspace/workspace.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#[[provider]]
#provider = "gitlab"
#name = "tom6"
#url = "https://gitlab.com"
#path = "gitlab"
#env_var = "GITLAB_TOKEN"
#exclude = []

[[provider]]
provider = "github"
name = "omgdgsdgsdsgdgssdggds"
path = "github"
env_var = "GITHUB_TOKEN"
skip_forks = false
provider = "gitlab"
name = "tom6"
url = "https://gitlab.com"
path = "gitlab"
env_var = "GITLAB_TOKEN"
exclude = []
url = "https://api.github.com/graphql"
Loading

0 comments on commit 91e0df4

Please sign in to comment.